ANON_FI_SUBMITFORM::define_trigger()

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


Source Source

File: src/integrations/formidable/triggers/anon-fi-submitform.php

	public function define_trigger() {
		$trigger = array(
			'author'              => Automator()->get_author_name(),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code, 'integration/formidable-forms/' ),
			'is_pro'              => false,
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Anonymous trigger - Formidable */
			'sentence'            => sprintf( __( '{{A form:%1$s}} is submitted', 'uncanny-automator' ), $this->trigger_meta ),
			/* translators: Anonymous trigger - Formidable */
			'select_option_name'  => __( '{{A form}} is submitted', 'uncanny-automator' ),
			'type'                => 'anonymous',
			'action'              => 'frm_after_create_entry',
			'priority'            => 20,
			'accepted_args'       => 2,
			'validation_function' => array( $this, 'fi_submit_form' ),
			'options'             => [
				Automator()->helpers->recipe->formidable->options->all_formidable_forms( null, $this->trigger_meta ),
			],
		);

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