GFFormSettings
Class GFFormSettings
Handles the form settings page.
Since: Unknown
Source: form_settings.php:16
Details
- Kind:
class - Namespace:
(global)
Methods
| Method | Description |
|---|---|
form_settings_page() | Determines which form settings page to display. |
form_settings_ui() | Displays the form settings UI. |
form_settings_fields() | Prepare form settings fields. |
legacy_markup_enabled_or_posted() | The Settings API runs the settings field method before processing the postback, |
show_legacy_markup_setting() | Determine whether to show the legacy markup setting. |
legacy_is_in_use() | Check whether any forms on this site use legacy markup. |
legacy_markup_warning() | Get the warning for the legacy markup field. |
deprecated_classes_warning() | Displays a warning if confirmation deprecated CSS Ready Classes are used in the form settings. |
initialize_settings_renderer() | Initialize Plugin Settings fields renderer. |
notification_page() | Runs the notification page. |
personal_data_page() | Renders the Personal Data page. |
page_header() | Displays the form settings page header. |
page_footer() | Displays the Settings page footer. |
get_tabs() | Gets the Settings page tabs. |
sorting_tabs_alphabetical() | Orders tabs array into alphabetical order |
maybe_process_confirmation_list_action() | Processes actions made from the Confirmations List page. |
delete_confirmation() | Delete a form confirmation by ID. |
output() | Echos a variable. |
output_field_scripts() | Outputs scripts for conditional logic fields. |
activate_save() | Handles the saving of notifications and confirmations when activated. |
deactivate_save() | Handles the saving of confirmation and notifications when deactivating. |
toggle_spam_confirmation() | Adds or removes the custom spam confirmation based on the value of the enableSpamConfirmation toggle. |
save_form_title() | Handles the saving of form titles. |
save_changed_form_settings_fields() | Saves new or changed form settings fields to the form object to automatically save custom fields. |
Method Reference
form_settings_page()
public static function form_settings_page()
Determines which form settings page to display.
Returns
void
Since: Unknown
Source: form_settings.php:34
form_settings_ui()
public static function form_settings_ui()
Displays the form settings UI.
Returns
void
Since: Unknown
Source: form_settings.php:76
form_settings_fields()
public static function form_settings_fields( $form )
Prepare form settings fields.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | Form being edited. |
Returns
array
Since:
2.52.9.8(Updated honeypotAction default to spam.)2.9.21(Moved the honeypot fields to a new spam section and added submission speed check fields.)2.10.0(Added the enableSpamConfirmation toggle to the spam section.)
Source: form_settings.php:108
legacy_markup_enabled_or_posted()
public static function legacy_markup_enabled_or_posted( $form )
The Settings API runs the settings field method before processing the postback,
so we have to run this hack to ensure we're respecting the posted value on initial load.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The form to check. |
Returns
bool
Since: 3.0.0
Source: form_settings.php:825
show_legacy_markup_setting()
public static function show_legacy_markup_setting()
Determine whether to show the legacy markup setting.
Returns
bool
Since: 2.7.15
Source: form_settings.php:840
legacy_is_in_use()
public static function legacy_is_in_use()
Check whether any forms on this site use legacy markup.
Returns
bool
Since: 2.7.15
Source: form_settings.php:857
legacy_markup_warning()
public static function legacy_markup_warning()
Get the warning for the legacy markup field.
Returns
string
Since: 2.7.15
Source: form_settings.php:876
deprecated_classes_warning()
public static function deprecated_classes_warning( $form )
Displays a warning if confirmation deprecated CSS Ready Classes are used in the form settings.
This method checks if the form uses any deprecated CSS Ready Classes and displays a warning message. It also ensures the warning is not shown if the user has dismissed it.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The form object being checked for deprecated classes. |
Returns
string|false— The HTML for the warning message or false if no warning is needed.
Since: 2.9.15
Source: form_settings.php:911
initialize_settings_renderer()
public static function initialize_settings_renderer()
Initialize Plugin Settings fields renderer.
Since:
2.52.9.8(Updated honeypotAction default to spam.)2.9.21(Updated to save the submission speed check fields.)2.10.0(Updated to handle the enableSpamConfirmation toggle.)
Source: form_settings.php:957
notification_page()
public static function notification_page()
Runs the notification page.
Returns
void
Since: Unknown
Source: form_settings.php:1239
personal_data_page()
public static function personal_data_page()
Renders the Personal Data page.
Since: 2.4
Source: form_settings.php:1252
page_header()
public static function page_header( $title='' )
Displays the form settings page header.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$title | string | '' | The title to display as the page header. Defaults to empty string. |
Returns
void
Since: Unknown
Source: form_settings.php:1290
page_footer()
public static function page_footer()
Displays the Settings page footer.
Since: Unknown
Source: form_settings.php:1376
get_tabs()
public static function get_tabs( $form_id )
Gets the Settings page tabs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form_id | int | The form ID to get tabs for. |
Returns
array— $settings_tabs The form settings tabs to display.
Since: Unknown
Source: form_settings.php:1394
sorting_tabs_alphabetical()
public static function sorting_tabs_alphabetical( array $settings_tab, array $primary_settings_tab_keys )
Orders tabs array into alphabetical order
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$settings_tab | array | ||
$primary_settings_tab_keys | array |
Returns
array
Since: 2.7.4
Source: form_settings.php:1459
maybe_process_confirmation_list_action()
public static function maybe_process_confirmation_list_action()
Processes actions made from the Confirmations List page.
Returns
void
Since: Unknown
Source: form_settings.php:1495
delete_confirmation()
public static function delete_confirmation( $confirmation_id, $form_id )
Delete a form confirmation by ID.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$confirmation_id | string | The confirmation to be deleted. | |
$form_id | int | array | The form ID or Form Object form the confirmation being deleted. |
Returns
false|int— The result of the database operation.
Since: Unknown
Source: form_settings.php:1526
output()
public static function output( $a )
Echos a variable.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$a | string | Thing to echo. |
Returns
void
Since: Unknown
Source: form_settings.php:1544
output_field_scripts()
public static function output_field_scripts( $echo=true )
Outputs scripts for conditional logic fields.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$echo | bool | true | If the scripts should be echoed. Defaults to true. |
Returns
string— $script_str The scripts to be output.
Since: Unknown
Source: form_settings.php:1561
activate_save()
public static function activate_save( $form )
Handles the saving of notifications and confirmations when activated.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The Form Object to be saved. |
Returns
array— $form The Form Object.
Since: Unknown
Source: form_settings.php:1594
deactivate_save()
public static function deactivate_save( $form )
Handles the saving of confirmation and notifications when deactivating.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The Form Object. |
Returns
array— $form The Form Object.
Since: Unknown
Source: form_settings.php:1653
toggle_spam_confirmation()
public static function toggle_spam_confirmation( $form )
Adds or removes the custom spam confirmation based on the value of the enableSpamConfirmation toggle.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The form being edited. |
Returns
array
Since: 2.10.0
Source: form_settings.php:1689
save_form_title()
public static function save_form_title()
Handles the saving of form titles.
Returns
void
Since: Unknown
Source: form_settings.php:1732
save_changed_form_settings_fields()
public static function save_changed_form_settings_fields( $form, $values )
Saves new or changed form settings fields to the form object to automatically save custom fields.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The form object. | |
$values | array | The array of values being saved. |
Returns
array— $form The Form Object.
Since: 2.5.2
Source: form_settings.php:1774