| @@ -88,9 +88,8 @@ | ||
| 88 | 88 | * @return string |
| 89 | 89 | */ |
| 90 | 90 | public static function get_current_action_from_global_var( $form_id ) { |
| 91 | 91 | global $frm_vars; |
| 92 | - | |
| 93 | 92 | return $frm_vars['form_params'][ $form_id ]['action'] ?? 'create'; |
| 94 | 93 | } |
| 95 | 94 | |
| 96 | 95 | /** |
| @@ -161,10 +160,9 @@ | ||
| 161 | 160 | if ( self::has_submit_field_in_list( $fields ) ) { |
| 162 | 161 | return; |
| 163 | 162 | } |
| 164 | 163 | |
| 165 | - $field_data = FrmFieldsHelper::setup_new_vars( self::FIELD_TYPE, $form->id ); | |
| 166 | - | |
| 164 | + $field_data = FrmFieldsHelper::setup_new_vars( self::FIELD_TYPE, $form->id ); | |
| 167 | 165 | $submit_settings = self::get_submit_settings_from_form( $form ); |
| 168 | 166 | $field_data['field_options'] = $submit_settings + $field_data['field_options']; |
| 169 | 167 | $field_data['name'] = FrmForm::get_option( |
| 170 | 168 | array( |
| @@ -211,8 +209,9 @@ | ||
| 211 | 209 | } |
| 212 | 210 | |
| 213 | 211 | $submit_field = $field; |
| 214 | 212 | } |
| 213 | + | |
| 215 | 214 | return $submit_field; |
| 216 | 215 | } |
| 217 | 216 | |
| 218 | 217 | /** |
| @@ -226,9 +225,9 @@ | ||
| 226 | 225 | */ |
| 227 | 226 | public static function update_last_row_fields_order_when_adding_field( $field_count ) { |
| 228 | 227 | $last_row_field_ids = FrmAppHelper::get_post_param( 'last_row_field_ids', array() ); |
| 229 | 228 | |
| 230 | - if ( ! is_array( $last_row_field_ids ) || empty( $last_row_field_ids ) ) { | |
| 229 | + if ( ! is_array( $last_row_field_ids ) || ! $last_row_field_ids ) { | |
| 231 | 230 | return; |
| 232 | 231 | } |
| 233 | 232 | |
| 234 | 233 | foreach ( $last_row_field_ids as $index => $last_row_field_id ) { |