IntroductionSettings and PropertiesSettingsPropertiesSource Code
Introduction
The GF_Field_Page class extends the GF_Field class, also known as the Field Object. This class is responsible for determining how the Page field is rendered in the form editor. This only handles the section called 「PAGE BREAK」, not the 「START PAGING」 or 「END PAGING」 sections.
Settings and Properties
Settings control what options are available to the admin user when configuring the field in the form editor. Gravity Forms includes many built-in settings such as Field Label, Field Description, Choices, Conditional Logic, etc. In addition to built-in settings, custom settings can also be developed. For more information on how to develop custom settings and how to associate settings to a field, visit the GF_Field page.
Properties contain the values specified by the settings and generally are part of the Field Object.
The properties may be retrieved by accessing the Field Object as follows:
12345//get the field$field = GFFormsModel::get_field( $form, 1 ); //get the type$type = $field->type;
Settings
The following settings are available for the field:
conditional_logic_nextbutton_setting
Determines whether the 「Enable Next Button Conditional Logic」 section displays in the 「PAGE BREAK」 settings. This allows logic to be applied to control whether the 「Next」 button is displayed or hidden.
conditional_logic_page_setting
Determines whether the 「Enable Page Conditional Logic」 section displays in the 「PAGE BREAK」 settings. This allows logic to be applied to control whether the page is displayed or hidden.
css_class_setting
Controls whether the 「Custom CSS Class」 setting displays. This allows a custom css to be used for the field.
next_button_setting
Determines whether the 「Next Button」 section displays in the 「PAGE BREAK」 settings. This section allows different text or a custom image to be used for the button.
previous_button_setting
Determines whether the 「Previous Button」 section displays in the 「PAGE BREAK」 settings. This section allows different text or a custom image to be used for the button.
Properties
Below is a listing of the properties inherited from the parent class and ones specific to the field:
displayOnly boolean
Indicates the field is only displayed and its contents are not submitted with the form/saved with the entry. This is set to true.
formId integer
The form ID.
id integer
The field ID.
nextButton array
An array containing the the individual properties for the 「Next」 button.
type string
The type of 「button」 displayed. This may be 「text」 or 「image」.
text string
The text that displays on the button when it is not set to an image.
imageUrl string
The path to the image to be used for the button when the type is set to 「image」.
conditionalLogic array
The conditional logic rules that are to be applied to the 「Next」 button.
123456$next_button = array( 'type' => 'text', 'text' => 'Next Page', 'imageUrl' => '', 'conditionalLogic' => array())
pageNumber integer
The page number of the current page.
previousButton array
An array containing the the individual properties for the 「Previous」 button.
type string
The type of 「button」 displayed. This may be 「text」 or 「image」.
text string
The text that displays on the button when it is not set to an image.
imageUrl string
The path to the image to be used for the button when the type is set to 「image」.
12345$previous_button = array( 'type' => 'image', 'text' => '', 'imageUrl' => 'wp-content/uploads/2016/02/12493815_1539502326378360_2030773273496389484_o.jpg',)
type string
The field type. This is set to 「section」.
Source Code
The source code is located in includes/fields/class-gf-field-page.php in the Gravity Forms folder of your sites plugins directory.