PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
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
← All changes | classes/models/fields/FrmFieldRadio.php +4 -54 6.355.0 View file →
@@ -9,9 +9,8 @@
9 9 class FrmFieldRadio extends FrmFieldType {
10 10
11 11 /**
12 12 * @var string
13 - *
14 13 * @since 3.0
15 14 */
16 15 protected $type = 'radio';
17 16
@@ -16,9 +15,8 @@
16 15 protected $type = 'radio';
17 16
18 17 /**
19 18 * @var bool
20 - *
21 19 * @since 3.0
22 20 */
23 21 protected $holds_email_values = true;
24 22
@@ -25,21 +23,12 @@
25 23 /**
26 24 * Does the html for this field label need to include "for"?
27 25 *
28 26 * @var bool
29 - *
30 27 * @since 3.06.01
31 28 */
32 29 protected $has_for_label = false;
33 30
34 - /**
35 - * @var bool
36 - */
37 - protected $array_allowed = true;
38 -
39 - /**
40 - * @return string
41 - */
42 31 protected function input_html() {
43 32 return $this->multiple_input_html();
44 33 }
45 34
@@ -47,23 +36,11 @@
47 36 return $this->include_front_form_file();
48 37 }
49 38
50 39 /**
51 - * @return bool[]
52 - */
53 - protected function field_settings_for_type() {
54 - return array(
55 - 'invalid' => true,
56 - );
57 - }
58 -
59 - /**
60 40 * Get the type of field being displayed.
61 41 *
62 42 * @since 4.02.01
63 - *
64 - * @param array|object $field
65 - *
66 43 * @return array
67 44 */
68 45 public function displayed_field_type( $field ) {
69 46 return array(
@@ -70,20 +47,16 @@
70 47 $this->type => true,
71 48 );
72 49 }
73 50
74 - /**
75 - * @return array
76 - */
77 51 protected function extra_field_opts() {
52 + $form_id = $this->get_field_column( 'form_id' );
53 +
78 54 return array(
79 - 'align' => '',
55 + 'align' => FrmStylesController::get_style_val( 'radio_align', ( empty( $form_id ) ? 'default' : $form_id ) ),
80 56 );
81 57 }
82 58
83 - /**
84 - * @return string[]
85 - */
86 59 protected function new_field_settings() {
87 60 return array(
88 61 'options' => serialize(
89 62 array(
@@ -95,40 +68,17 @@
95 68 }
96 69
97 70 /**
98 71 * @since 4.06
99 - *
100 - * @param array $args
101 - *
102 - * @return void
103 72 */
104 73 protected function show_priority_field_choices( $args = array() ) {
105 - include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-images.php';
74 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/radio-images.php' );
106 75 }
107 76
108 - /**
109 - * @return string
110 - */
111 77 protected function include_front_form_file() {
112 78 return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/front-end/radio-field.php';
113 79 }
114 80
115 - /**
116 - * @return bool
117 - */
118 81 protected function show_readonly_hidden() {
119 82 return true;
120 - }
121 -
122 - /**
123 - * Unset aria-invalid for radio buttons because it's not valid for radio buttons.
124 - * Instead aria-invalid is added to the radiogroup parent element.
125 - *
126 - * @since 6.25
127 - *
128 - * @param array $shortcode_atts
129 - * @param array $args
130 - */
131 - public function set_aria_invalid_error( &$shortcode_atts, $args ) {
132 - unset( $shortcode_atts['aria-invalid'] );
133 83 }
134 84 }