ANON_ELEM_SUBMITFORM::define_trigger()

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


Source Source

File: src/integrations/elementor/triggers/anon-elem-submitform.php

	public function define_trigger() {
		$trigger = array(
			'author'              => Automator()->get_author_name(),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code, 'integration/elementor/' ),
			'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'              => 'elementor_pro/forms/new_record',
			'priority'            => 100,
			'type'                => 'anonymous',
			'accepted_args'       => 2,
			'validation_function' => array( $this, 'elem_submit_form' ),
			'options'             => [
				Automator()->helpers->recipe->elementor->options->all_elementor_forms( null, $this->trigger_meta ),
			],
		);

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