LLMS_Form_Validator::get_required_fields( array[] $fields )

Filters a list of fields down to only the required fields.


Parameters Parameters

$fields

(array[]) (Required) Array of LifterLMS Form Field settings arrays.


Top ↑

Return Return

(array[])


Top ↑

Source Source

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

	public function get_required_fields( $fields ) {
		return array_values(
			array_filter(
				$fields,
				function( $field ) {
					return ! empty( $field['required'] );
				}
			)
		);
	}


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.