FR_SUBMITFORM::define_trigger()

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


Source Source

File: src/integrations/forminator/triggers/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/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Logged-in trigger - Forminator */
			'sentence'            => sprintf( esc_attr__( 'A user submits {{a form:%1$s}}', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Logged-in trigger - Forminator */
			'select_option_name'  => esc_attr__( 'A user submits {{a form}}', 'uncanny-automator' ),
			'action'              => 'forminator_custom_form_after_save_entry',
			'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 );

		return;
	}