| @@ -207,9 +207,9 @@ | ||
| 207 | 207 | $options = isset($field['options']) && !empty($field['options']) ? $field['options'] : ['Option 1', 'Option 2', 'Option 3']; |
| 208 | 208 | if (is_string($options)) $options = explode("\n", $options); |
| 209 | 209 | |
| 210 | 210 | $html .= '<select name="' . esc_attr($name) . '" class="' . $input_class . '" ' . $required . ' ' . $input_style . ' style="width:100%;">'; |
| 211 | - $html .= '<option value="">' . esc_html($placeholder ? $placeholder : __('Select Option', 'formlayer')) . '</option>'; | |
| 211 | + $html .= '<option value="">' . esc_html($placeholder ? $placeholder : 'Select Option') . '</option>'; | |
| 212 | 212 | foreach($options as $opt) { |
| 213 | 213 | $o = is_array($opt) ? $opt : ['label' => $opt, 'value' => $opt, 'default' => false]; |
| 214 | 214 | $selected = ($default_value === $o['value'] || (empty($default_value) && !empty($o['default']))) ? 'selected' : ''; |
| 215 | 215 | $html .= '<option value="' . esc_attr($o['value']) . '" ' . $selected . '>' . esc_html($o['label']) . '</option>'; |
| @@ -323,9 +323,9 @@ | ||
| 323 | 323 | $raw_terms_label = isset($field['terms_label']) && $field['terms_label'] !== '' ? $field['terms_label'] : ($label ? $label : __('I agree to the Terms & Conditions', 'formlayer')); |
| 324 | 324 | $html .= ' |
| 325 | 325 | <div class="formlayer-terms-wrap"> |
| 326 | 326 | <input type="checkbox" name="' . esc_attr($name) . '" ' . $required . '> |
| 327 | - <span class="formlayer-terms-label" ' . $label_style . '>' . wp_kses_post($raw_terms_label) . '</span> | |
| 327 | + <span class="formlayer-terms-label">' . wp_kses_post($raw_terms_label) . '</span> | |
| 328 | 328 | </div>'; |
| 329 | 329 | break; |
| 330 | 330 | case 'gdpr': |
| 331 | 331 | $gdpr_label = isset($field['gdpr_label']) ? $field['gdpr_label'] : 'Accept GDPR Policy'; |
| @@ -333,9 +333,9 @@ | ||
| 333 | 333 | $html .= ' |
| 334 | 334 | <div class="formlayer-gdpr-wrap"> |
| 335 | 335 | <input type="checkbox" name="' . esc_attr($name) . '" ' . $required . '> |
| 336 | 336 | <div class="formlayer-gdpr-info"> |
| 337 | - <div class="formlayer-gdpr-label" ' . $label_style . '>' . wp_kses_post($gdpr_label) . '</div> | |
| 337 | + <div class="formlayer-gdpr-label">' . wp_kses_post($gdpr_label) . '</div> | |
| 338 | 338 | ' . ($gdpr_desc ? '<div class="formlayer-gdpr-desc">' . wp_kses_post($gdpr_desc) . '</div>' : '') . ' |
| 339 | 339 | </div> |
| 340 | 340 | </div>'; |
| 341 | 341 | break; |
| @@ -402,12 +402,9 @@ | ||
| 402 | 402 | if ($type === 'url') { |
| 403 | 403 | if (!empty($field['url_validation'])) $extra_attrs .= ' data-validate-url="1"'; |
| 404 | 404 | if (!empty($field['url_https_only'])) $extra_attrs .= ' data-https-only="1"'; |
| 405 | 405 | } |
| 406 | - if ($type === 'phone' && empty($placeholder)) { | |
| 407 | - $placeholder = __('Phone Number', 'formlayer'); | |
| 408 | - } | |
| 409 | - $input_type = in_array($type, ['password', 'url', 'tel', 'phone', 'hidden']) ? ($type === 'phone' ? 'tel' : $type) : 'text'; | |
| 406 | + $input_type = in_array($type, ['password', 'url', 'tel', 'hidden']) ? $type : 'text'; | |
| 410 | 407 | $html .= '<input type="' . esc_attr($input_type) . '" name="' . esc_attr($name) . '" class="' . $input_class . '" placeholder="' . esc_attr($placeholder) . '" value="' . esc_attr($default_value) . '" ' . $required . ' ' . $input_style . $extra_attrs . '>'; |
| 411 | 408 | break; |
| 412 | 409 | } |
| 413 | 410 | |