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/Fields/HTMLField.php +17 -11 2.03.3.1 View file →
@@ -3,11 +3,13 @@
3 3 namespace BitCode\BitForm\Frontend\Form\View\Theme\Fields;
4 4
5 5 use BitCode\BitForm\Core\Util\FieldValueHandler;
6 6
7 -class HTMLField {
8 - public static function init($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error = null, $value = null) {
9 - $fieldHelpers = new FieldHelpers($field, $rowID, $form_atomic_Cls_map);
7 +class HTMLField
8 +{
9 + public static function init($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error = null, $value = null)
10 + {
11 + $fieldHelpers = new ClassicFieldHelpers($field, $rowID, $form_atomic_Cls_map);
10 12
11 13 $content = '';
12 14 if (isset($field->content) && !empty($field->content)) {
13 15 $content = $field->content;
@@ -16,14 +18,18 @@
16 18 }
17 19
18 20 $content = FieldValueHandler::replaceSmartTagWithValue($content);
19 21
20 - return <<<HTMLFIELD
21 - <div
22 - class="{$fieldHelpers->getAtomicCls('fld-wrp')} {$fieldHelpers->getCustomClasses('fld-wrp')}"
23 - {$fieldHelpers->getCustomAttributes('fld-wrp')}
24 - >
25 - {$fieldHelpers->renderHTMR($content)}
26 - </div>
27 -HTMLFIELD;
22 + return sprintf(
23 + '<div
24 + %1$s
25 + class="%2$s %3$s"
26 + >
27 + %4$s
28 + </div>',
29 + $fieldHelpers->getCustomAttributes('fld-wrp'),
30 + $fieldHelpers->getAtomicCls('fld-wrp'),
31 + $fieldHelpers->getCustomClasses('fld-wrp'),
32 + $fieldHelpers->renderHTMR($content)
33 + );
28 34 }
29 35 }