PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | includes/Frontend/Form/View/Theme/ThemeBase.php +10 -0 V_3.0.03.3.1 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 2
3 3 namespace BitCode\BitForm\Frontend\Form\View\Theme;
4 4
5 +use BitCode\BitForm\Frontend\Form\View\Theme\Fields\AddressField;
5 6 use BitCode\BitForm\Frontend\Form\View\Theme\Fields\ButtonField;
6 7 use BitCode\BitForm\Frontend\Form\View\Theme\Fields\CheckBoxField;
7 8 use BitCode\BitForm\Frontend\Form\View\Theme\Fields\CountryField;
8 9 use BitCode\BitForm\Frontend\Form\View\Theme\Fields\CurrencyField;
@@ -38,8 +39,11 @@
38 39
39 40 public function inputWrapper($formViewInstance, $rowID)
40 41 {
41 42 $field = $formViewInstance->fields($rowID);
43 + if (!is_object($field)) {
44 + return '';
45 + }
42 46 $field_name = $formViewInstance->getFieldName($rowID);
43 47 $form_atomic_Cls_map = $formViewInstance->getAtomicClaMap();
44 48 $error = $formViewInstance->getError($rowID);
45 49 $value = $formViewInstance->getValue($field_name, $rowID);
@@ -83,8 +87,12 @@
83 87 }
84 88
85 89 protected function getField($field, $rowID, $field_name, $form_atomic_Cls_map, $error = null, $value = null, $formID = null)
86 90 {
91 + if (!is_object($field)) {
92 + return '';
93 + }
94 +
87 95 // Pro-only fields ship in the Bit Form Pro plugin. In the free plugin, we avoid rendering Pro implementations.
88 96 $proMissingHtml = '<div class="bf-pro-field-missing"> <!-- Require Bit Form Pro --> </div>';
89 97
90 98 switch ($field->typ) {
@@ -102,8 +110,10 @@
102 110 case 'password':
103 111 case 'email':
104 112 case 'name':
105 113 return FieldWithChild::init($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error, $value);
114 + case 'address':
115 + return AddressField::init($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error, $value);
106 116 case 'textarea':
107 117 return TextAreaField::init($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error, $value);
108 118 case 'range':
109 119 return SliderField::init($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error, $value);