← All changes
|
classes/views/frm-fields/front-end/dropdown-field.php
+6
-3
6.29
→
trunk
View file →
| @@ -1,9 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package Formidable |
| 4 | 4 | * |
| 5 | - * @var array $field | |
| 5 | + * @var array $field | |
| 6 | + * @var array|null $args | |
| 6 | 7 | */ |
| 7 | 8 | |
| 8 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | 10 | die( 'You are not allowed to call this page directly.' ); |
| @@ -23,9 +24,11 @@ | ||
| 23 | 24 | |
| 24 | 25 | if ( $read_only ) { |
| 25 | 26 | ?> |
| 26 | 27 | <select <?php do_action( 'frm_field_input_html', $field ); ?>> |
| 27 | - <?php } else { ?> | |
| 28 | + <?php | |
| 29 | + } else { | |
| 30 | + ?> | |
| 28 | 31 | <select name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $html_id ); ?>" <?php do_action( 'frm_field_input_html', $field ); ?>> |
| 29 | 32 | <?php |
| 30 | 33 | } |
| 31 | 34 | |
| @@ -83,9 +86,9 @@ | ||
| 83 | 86 | } |
| 84 | 87 | |
| 85 | 88 | echo '<option '; |
| 86 | 89 | FrmAppHelper::array_to_html_params( $option_params, true ); |
| 87 | - selected( $selected ); | |
| 90 | + selected( (bool) $selected ); | |
| 88 | 91 | echo '>'; |
| 89 | 92 | echo esc_html( $opt === '' ? ' ' : $opt ); |
| 90 | 93 | FrmFieldsHelper::after_choice_input( $field, $opt_key ); |
| 91 | 94 | |