Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Form_Templates::get_block_data( string $field_id, boolean $confirm = true )

Retrieve data for a given field by id


Parameters Parameters

$field_id

(string) (Required) The field's identifier as found in the block schema list returned by LLMS_Form_Templates::get_reusable_block_schema().

$confirm

(boolean) (Optional) If true and the schema includes a confirmation field, will convert the field to a confirm group.

Default value: true


Top ↑

Return Return

(array) Returns an array containing the block data and title.


Top ↑

Source Source

File: includes/forms/class-llms-form-templates.php

	private static function get_block_data( $field_id, $confirm = true ) {

		$block = self::get_reusable_block_schema( $field_id );
		$title = $block['title'];
		unset( $block['title'] );

		if ( $confirm && ! empty( $block['confirm'] ) ) {
			$block = self::add_confirm_group( $block );
		}

		$block = self::prepare_blocks( array( $block ) );
		return compact( 'title', 'block' );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.