|
@@ -5,26 +5,26 @@ |
|
|
block discarded – undo |
|
5
|
5
|
* For help on using, see our documentation [https://yikesplugins.com/support/knowledge-base/product/easy-forms-for-mailchimp/] |
|
6
|
6
|
* @since 6.0 |
|
7
|
7
|
*/ |
|
8
|
|
- if ( is_string( $form_data['custom_fields'] ) ) { |
|
9
|
|
- $field_data = json_decode( $form_data['custom_fields'] , true ); |
|
10
|
|
- } elseif ( is_array( $form_data['custom_fields'] ) ) { |
|
11
|
|
- $field_data = $form_data['custom_fields']; |
|
|
8
|
+ if ( is_string( $form_data[ 'custom_fields' ] ) ) { |
|
|
9
|
+ $field_data = json_decode( $form_data[ 'custom_fields' ], true ); |
|
|
10
|
+ } elseif ( is_array( $form_data[ 'custom_fields' ] ) ) { |
|
|
11
|
+ $field_data = $form_data[ 'custom_fields' ]; |
|
12
|
12
|
} |
|
13
|
13
|
?> |
|
14
|
14
|
<div class="custom-field-section"> |
|
15
|
15
|
<!-- title --> |
|
16
|
|
- <strong><?php echo $field['label']; ?></strong> |
|
|
16
|
+ <strong><?php echo $field[ 'label' ]; ?></strong> |
|
17
|
17
|
|
|
18
|
18
|
<!-- Dropdown --> |
|
19
|
|
- <select class="custom-select-field" name="custom-field[<?php echo $field['id']; ?>]"> |
|
20
|
|
- <option value="" disabled selected><?php echo isset( $field['placeholder'] ) ? $field['placeholder'] : 'Select...'; ?></option> |
|
21
|
|
- <?php foreach( $field['options'] as $value => $label ) { ?> |
|
22
|
|
- <option value="<?php echo $value; ?>" <?php if( isset( $field_data[$field['id']] ) ) { selected( $field_data[$field['id']] , $value ); } ?>><?php echo $label; ?></option> |
|
|
19
|
+ <select class="custom-select-field" name="custom-field[<?php echo $field[ 'id' ]; ?>]"> |
|
|
20
|
+ <option value="" disabled selected><?php echo isset( $field[ 'placeholder' ] ) ? $field[ 'placeholder' ] : 'Select...'; ?></option> |
|
|
21
|
+ <?php foreach ( $field[ 'options' ] as $value => $label ) { ?> |
|
|
22
|
+ <option value="<?php echo $value; ?>" <?php if ( isset( $field_data[ $field[ 'id' ] ] ) ) { selected( $field_data[ $field[ 'id' ] ], $value ); } ?>><?php echo $label; ?></option> |
|
23
|
23
|
<?php } ?> |
|
24
|
24
|
</select> |
|
25
|
25
|
|
|
26
|
26
|
<!-- description --> |
|
27
|
|
- <?php if( isset( $field['description'] ) && $field['description'] != '' ) { ?> |
|
28
|
|
- <p class="description"><?php echo $field['description']; ?></p> |
|
|
27
|
+ <?php if ( isset( $field[ 'description' ] ) && $field[ 'description' ] != '' ) { ?> |
|
|
28
|
+ <p class="description"><?php echo $field[ 'description' ]; ?></p> |
|
29
|
29
|
<?php } ?> |
|
30
|
30
|
</div> |
|
31
|
31
|
\ No newline at end of file |