GF_Field_Submit
Source: includes/fields/class-gf-field-submit.php:8
Details
- Kind:
class - Namespace:
(global) - Extends: GF_Field
Properties
| Property | Type | Description |
|---|---|---|
$duplicatable | bool | Whether there can be more than one of this field type per form. |
$repeatable | bool | Whether the field can be used in a repeater. |
Methods
| Method | Description |
|---|---|
get_form_editor_field_title() | Returns the field title. |
get_form_editor_field_description() | Returns the field description. |
get_form_editor_field_icon() | Returns the field's form editor icon. |
get_form_editor_field_settings() | Returns the class names of the settings which should be available on the field in the form editor. |
get_form_editor_button() | Returns the field's form editor button. |
is_conditional_logic_supported() | This field supports conditional logic. |
validate() | Return the result (bool) by setting $this->failed_validation. |
disable_ajax_reload() | Decides if the field markup should not be reloaded after AJAX save. |
get_field_container() | Returns the HTML markup for the field's containing element. |
get_field_input() | Returns the field inner markup. |
get_field_content() | Returns the field markup; including field label, description, validation, and the form editor admin buttons. |
inject_inline_button() | Add the submit button as a field if it is inline. Target of the gform_pre_render filter. |
get_css_grid_class() | Get the appropriate CSS Grid class for the column span of the field. |
Method Reference
get_form_editor_field_title()
public function get_form_editor_field_title()
Returns the field title.
The submit button editor field title is declared in gf_vars['button'] instead of here.
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:45
get_form_editor_field_description()
public function get_form_editor_field_description()
Returns the field description.
The submit button editor field description is declared in gf_vars['buttonDescription'] instead of here.
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:56
get_form_editor_field_icon()
public function get_form_editor_field_icon()
Returns the field's form editor icon.
This could be an icon url or a gform-icon class.
Returns
string
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:69
get_form_editor_field_settings()
function get_form_editor_field_settings()
Returns the class names of the settings which should be available on the field in the form editor.
Returns
array
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:80
get_form_editor_button()
public function get_form_editor_button()
Returns the field's form editor button.
This field is automatically added to the form, so it doesn't have a button.
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:98
is_conditional_logic_supported()
public function is_conditional_logic_supported()
This field supports conditional logic.
Returns
bool
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:109
validate()
public function validate( $value, $form )
Return the result (bool) by setting $this->failed_validation.
Return the validation message (string) by setting $this->validation_message.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | array | The field value from get_value_submission(). | |
$form | array | The Form Object currently being processed. |
Since: 2.4.11
Source: includes/fields/class-gf-field-submit.php:122
disable_ajax_reload()
public function disable_ajax_reload()
Decides if the field markup should not be reloaded after AJAX save.
Returns
boolean
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:135
get_field_container()
public function get_field_container( $atts, $form )
Returns the HTML markup for the field's containing element.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$atts | array | Container attributes. | |
$form | array | The current Form object. |
Returns
string
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:149
get_field_input()
public function get_field_input( $form, $value='', $entry=null )
Returns the field inner markup.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The Form Object currently being processed. | |
$value | string | array | '' | The field value. From default/dynamic population, $_POST, or a resumed incomplete submission. |
$entry | null | array | null | Null or the Entry Object currently being edited. |
Returns
string
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:171
get_field_content()
public function get_field_content( $value, $force_frontend_label, $form )
Returns the field markup; including field label, description, validation, and the form editor admin buttons.
The {FIELD} placeholder will be replaced in GFFormDisplay::get_field_content with the markup returned by GF_Field::get_field_input().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$value | string | array | The field value. From default/dynamic population, $_POST, or a resumed incomplete submission. | |
$force_frontend_label | bool | Should the frontend label be displayed in the admin even if an admin label is configured. | |
$form | array | The Form Object currently being processed. |
Returns
string
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:205
inject_inline_button()
public function inject_inline_button( $form )
Add the submit button as a field if it is inline. Target of the gform_pre_render filter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | array | The form object. |
Returns
array— Returns the new form object
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:225
get_css_grid_class()
public function get_css_grid_class( $form='' )
Get the appropriate CSS Grid class for the column span of the field.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$form | '' |
Returns
string
Since: 2.6
Source: includes/fields/class-gf-field-submit.php:246