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