LLMS_Forms::get_form_fields( string $location, array $args = array() )

Retrieve an array of LLMS_Form_Fields settings arrays for the form at a given location.


Description Description

This method is used by the LLMS_Form_Handler to perform validations on user-submitted data.


Top ↑

Parameters Parameters

$location

(string) (Required) Form location, one of: "checkout", "registration", or "account".

$args

(array) (Optional) Additional arguments passed to the short-circuit filter in get_form_post().

Default value: array()


Top ↑

Return Return

(false|array)


Top ↑

Source Source

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

		 *
		 * @since 5.0.0
		 *
		 * @param array[] $fields   Array of LifterLMS Form Field settings data.
		 * @param string  $location Form location, one of: "checkout", "registration", or "account".
		 * @param array   $args     Additional arguments passed to the short-circuit filter in `get_form_post()`.
		 */
		return apply_filters( 'llms_get_form_fields', $fields, $location, $args );
	}

	/**
	 * Retrieve an array of LLMS_Form_Field settings from an array of blocks.
	 *
	 * @since 5.0.0
	 * @since 5.1.0 Pass the whole list of blocks to the `$this->block_to_field_settings()` method
	 *              to better check whether a block is visible.
	 * @since 6.2.0 Exploded hidden checkbox fields.
	 *
	 * @param array $blocks Array of WP Block arrays from `parse_blocks()`.
	 * @return array
	 */
	public function get_fields_settings_from_blocks( $blocks ) {

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.