Form_Frontend_Output_Handler::get_nonce_action( awsmug\Torro_Forms\DB_Objects\Forms\Form $form, awsmug\Torro_Forms\DB_Objects\Submissions\Submission|null $submission = null )

Returns the name of the nonce action to check.

Description

Parameters

$form

(awsmug\Torro_Forms\DB_Objects\Forms\Form) (Required) Form object.

$submission

(awsmug\Torro_Forms\DB_Objects\Submissions\Submission|null) (Optional) Submission object, or null if none available.

Default value: null

Return

(string) Nonce action name.

Source

File: src/db-objects/forms/form-frontend-output-handler.php

	protected function get_nonce_action( $form, $submission = null ) {
		if ( $submission && ! empty( $submission->id ) ) {
			return $this->form_manager->get_prefix() . 'form_' . $form->id . '_submission_' . $submission->id;
		}

		return $this->form_manager->get_prefix() . 'form_' . $form->id;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.