Returns the available meta fields for the submodule.
Description
See also
Return
(array) Associative array of <code>$field_slug => $field_args</code> pairs.
Source
File: src/modules/access-controls/user-identification.php
public function get_meta_fields() { $meta_fields = parent::get_meta_fields(); unset( $meta_fields['enabled'] ); $meta_fields['prevent_edit_others_submission'] = array( 'type' => 'checkbox', 'label' => __( 'Prevent users from accessing someone else's submission?', 'torro-forms' ), 'description' => __( 'Click the checkbox to ensure that participants cannot access other participants' submissions.', 'torro-forms' ), 'default' => true, 'wrap_classes' => array( 'has-torro-tooltip-description' ), 'visual_label' => __( 'User per submission', 'torro-forms' ), ); $meta_fields['prevent_multiple_submissions'] = array( 'type' => 'checkbox', 'label' => __( 'Prevent multiple submissions by a single user?', 'torro-forms' ), 'description' => __( 'Click the checkbox to ensure that participants may only submit this form once.', 'torro-forms' ), 'wrap_classes' => array( 'has-torro-tooltip-description' ), 'visual_label' => __( 'Single submission', 'torro-forms' ), ); $meta_fields['identification_modes'] = array( 'type' => 'multibox', 'label' => __( 'Identification Modes', 'torro-forms' ), 'description' => __( 'For non logged-in users, by default PHP sessions are used to identity them. You can enable further modes here to improve accuracy.', 'torro-forms' ), 'choices' => array( 'ip_address' => __( 'IP address', 'torro-forms' ), 'cookie' => __( 'Cookie', 'torro-forms' ), ), ); $meta_fields['already_submitted_message'] = array( 'type' => 'text', 'label' => __( '“Already submitted” Message', 'torro-forms' ), 'description' => __( 'Enter the message to show to the user when they have already submitted this form.', 'torro-forms' ), 'default' => $this->get_default_already_submitted_message(), 'input_classes' => array( 'regular-text' ), 'wrap_classes' => array( 'has-torro-tooltip-description' ), 'dependencies' => array( array( 'prop' => 'display', 'callback' => 'get_data_by_condition_true', 'fields' => array( 'prevent_multiple_submissions' ), 'args' => array(), ), ), ); return $meta_fields; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |