GF_SUBFORM_CODES::validate_trigger( $args )

Validate the trigger.


Parameters Parameters

$args

(Required)


Top ↑

Return Return

(bool)


Source Source

File: src/integrations/gravity-forms/triggers/gf-subform-codes.php

	protected function validate_trigger( ...$args ) {

		$args = array_shift( $args );

		if ( empty( $args[0] ) || empty( $args[1] ) ) {
			return false;
		}

		$entry  = $args[0];
		$form   = $args[1];
		$fields = $form['fields'];

		// Get all the codes field.
		$uo_codes_fields = Gravity_Forms_Helpers::is_uncanny_code_field_exist( $fields );

		// True if theres a codes field and that code field has a value.
		return $uo_codes_fields;

	}