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