Appearance Tab

Appearance Tab

IntroductionSettingsSource Code

Introduction
The following settings are available for use on a field』s Appearance tab. The gform_field_appearance_settings hook can also be used to add custom settings at the positions indicated below.
Settings can be enabled for a field which extends the GF_Field class by overriding the get_form_editor_field_settings() method.
Settings

Position: 0

placeholder_setting
The Placeholder setting allows you to define the value of the placeholder attribute for the field input.

Position: 20

placeholder_textarea_setting
The Placeholder setting allows you to define the value of the placeholder attribute for the field textarea.

Position: 50

input_placeholders_setting
The Placeholders setting allows you to define the values of the placeholder attributes for the field inputs.

Position: 100

label_placement_setting
This displays a Field Label Visibility setting (when enabled by the gform_enable_field_label_visibility_settings filter) allowing the field label to be hidden and a Description Placement setting allowing the field description location to be overridden.

Position: 150

sub_label_placement_setting
The Sub-Label Placement setting allows the sub label position to be overridden or hidden (when enabled by the gform_enable_field_label_visibility_settings filter).

Position: 200

error_message_setting
Includes a Custom Validation Message setting enabling the field validation message to be overridden. Note: this does not override the message returned when the field fails no duplicates validation.

Position: 250

css_class_setting
The Custom CSS Class setting allows custom css class names to be added to the field container (the li element which contains the field).

Position: 300

enable_enhanced_ui_setting
Includes a Enable enhanced user interface setting allowing the select element used by the Drop Down and Multi Select fields to be enhanced by the chosen.js script.

Position: 400

size_setting
The Field Size setting provides a drop down allowing the field size to be set to small, medium, or large.

Source Code
The above settings are located in GFFormDetail::forms_page() in form_detail.php.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注