PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.05.02
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.05.02
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / frm-fields / back-end / radio-field.php

radio-field.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 4.05.02, at classes/views/frm-fields/back-end/radio-field.php

49 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( isset( $field['post_field'] ) && $field['post_field'] === 'post_category' ) {
4 $type = $field['type'];
5 do_action( 'frm_after_checkbox', compact( 'field', 'field_name', 'type' ) );
6 } elseif ( is_array( $field['options'] ) ) {
7
8 foreach ( $field['options'] as $opt_key => $opt ) {
9
10 $field_val = FrmFieldsHelper::get_value_from_array( $opt, $opt_key, $field );
11 $opt = FrmFieldsHelper::get_label_from_array( $opt, $opt_key, $field );
12 ?>
13 <div class="frm_radio">
14 <label for="<?php echo esc_attr( $html_id . '-' . $opt_key ); ?>">
15 <?php
16
17 $checked = FrmAppHelper::check_selected( $field['value'], $field_val ) ? 'checked="checked" ' : ' ';
18
19 $other_opt = false;
20 $other_args = FrmFieldsHelper::prepare_other_input( compact( 'field_name', 'opt_key', 'field' ), $other_opt, $checked );
21 ?>
22 <input type="radio" name="<?php echo esc_attr( $field_name ); ?>" id="<?php echo esc_attr( $html_id . '-' . $opt_key ); ?>" value="<?php echo esc_attr( $field_val ); ?>" <?php
23 echo $checked; // WPCS: XSS ok.
24 do_action( 'frm_field_input_html', $field );
25 ?>/>
26 <?php echo ' ' . FrmAppHelper::kses( $opt, 'all' ); // WPCS: XSS ok. ?>
27 </label>
28 <?php
29 FrmFieldsHelper::include_other_input(
30 array(
31 'other_opt' => $other_opt,
32 'read_only' => false,
33 'checked' => $checked,
34 'name' => $other_args['name'],
35 'value' => $other_args['value'],
36 'field' => $field,
37 'html_id' => $html_id,
38 'opt_key' => $opt_key,
39 'opt_label' => $opt,
40 )
41 );
42
43 unset( $other_opt, $other_args );
44 ?>
45 </div>
46 <?php
47 }
48 }
49