| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * Submit field class |
| 4 | 4 | * |
| 5 | 5 | * @since 6.9 |
| 6 | + * | |
| 6 | 7 | * @package Formidable |
| 7 | 8 | */ |
| 8 | 9 | |
| 9 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -41,15 +42,13 @@ | ||
| 41 | 42 | * |
| 42 | 43 | * @return string |
| 43 | 44 | */ |
| 44 | 45 | public function default_html() { |
| 45 | - $default_html = <<<DEFAULT_HTML | |
| 46 | + return <<<DEFAULT_HTML | |
| 46 | 47 | <div id="frm_field_[id]_container" class="frm_form_field form-field [required_class][error_class]"> |
| 47 | 48 | [input] |
| 48 | 49 | </div> |
| 49 | 50 | DEFAULT_HTML; |
| 50 | - | |
| 51 | - return $default_html; | |
| 52 | 51 | } |
| 53 | 52 | |
| 54 | 53 | /** |
| 55 | 54 | * Sets settings for this field type. |
| @@ -56,9 +55,9 @@ | ||
| 56 | 55 | * |
| 57 | 56 | * @return array |
| 58 | 57 | */ |
| 59 | 58 | protected function field_settings_for_type() { |
| 60 | - $settings = array( | |
| 59 | + return array( | |
| 61 | 60 | 'required' => false, |
| 62 | 61 | 'visibility' => false, |
| 63 | 62 | 'label_position' => false, |
| 64 | 63 | 'options' => false, |
| @@ -65,10 +64,8 @@ | ||
| 65 | 64 | 'default' => false, |
| 66 | 65 | 'description' => false, |
| 67 | 66 | 'logic' => true, |
| 68 | 67 | ); |
| 69 | - | |
| 70 | - return $settings; | |
| 71 | 68 | } |
| 72 | 69 | |
| 73 | 70 | /** |
| 74 | 71 | * Includes form builder file. |
| @@ -90,12 +87,14 @@ | ||
| 90 | 87 | * Gets frontend field input. |
| 91 | 88 | * |
| 92 | 89 | * @param array $args Args. |
| 93 | 90 | * @param array $shortcode_atts Shortcode atts. |
| 91 | + * | |
| 94 | 92 | * @return string |
| 95 | 93 | */ |
| 96 | 94 | public function front_field_input( $args, $shortcode_atts ) { |
| 97 | 95 | $form = $args['form']; |
| 96 | + | |
| 98 | 97 | if ( ! FrmForm::show_submit( $form ) ) { |
| 99 | 98 | return ''; |
| 100 | 99 | } |
| 101 | 100 | |