ANON_FR_SUBMITFORM::define_trigger()

Define and register the trigger by pushing it into the Automator object


Source Source

File: src/integrations/forminator/triggers/anon-fr-submitform.php

	public function define_trigger() {
		$trigger = array(
			'author'              => Automator()->get_author_name(),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code, 'integration/forminator/' ),
			'is_pro'              => false,
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Logged-in trigger - Forminator */
			'sentence'            => sprintf( esc_attr__( '{{A form:%1$s}} is submitted', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Logged-in trigger - Forminator */
			'select_option_name'  => esc_attr__( '{{A form}} is submitted', 'uncanny-automator' ),
			'action'              => 'forminator_custom_form_submit_before_set_fields',
			'type'                => 'anonymous',
			'priority'            => 100,
			'accepted_args'       => 3,
			'validation_function' => array( $this, 'fr_submit_form' ),
			'options'             => [
				Automator()->helpers->recipe->forminator->options->all_forminator_forms( null, $this->trigger_meta ),
			],
		);

		Automator()->register->trigger( $trigger );
	}