Module::set_submission_data( awsmug\Torro_Forms\DB_Objects\Submissions\Submission $submission, awsmug\Torro_Forms\DB_Objects\Forms\Form $form, array $data )

Sets additional data for a submission when it is created.

Description

See also

Parameters

$submission

(awsmug\Torro_Forms\DB_Objects\Submissions\Submission) (Required) New submission object.

$form

(awsmug\Torro_Forms\DB_Objects\Forms\Form) (Required) Form object the submission belongs to.

$data

(array) (Required) Submission POST data.

Source

File: src/modules/access-controls/module.php

	protected function set_submission_data( $submission, $form, $data ) {
		foreach ( $this->submodules as $slug => $access_control ) {
			if ( ! is_a( $access_control, Submission_Modifier_Access_Control_Interface::class ) ) {
				continue;
			}

			if ( ! $access_control->enabled( $form ) ) {
				continue;
			}

			$access_control->set_submission_data( $submission, $form, $data );
		}
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.