PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.10.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.10.2
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
bit-form / includes / Frontend / Form / View / Conversational / Fields / ConversationalFieldHelpers.php

ConversationalFieldHelpers.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.10.2, at includes/Frontend/Form/View/Conversational/Fields/ConversationalFieldHelpers.php

49 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\Frontend\Form\View\Conversational\Fields;
4
5 use BitCode\BitForm\Frontend\Form\View\FieldHelpers;
6
7 class ConversationalFieldHelpers extends FieldHelpers
8 {
9 private $_formId;
10
11 public function __construct($formId, $field, $fk, $form_atomic_Cls_map = null)
12 {
13 parent::__construct($field, $fk, $form_atomic_Cls_map);
14 $this->_formId = $formId;
15 }
16
17 public function getClassWithFieldKey($element)
18 {
19 $formId = $this->getFormId();
20 $formId = !empty($formId) ? $formId : '';
21 return "{$this->getFk()}-{$element}";
22 }
23
24 public function getConversationalCls($element)
25 {
26 $formId = $this->getFormId();
27 $formId = !empty($formId) ? $formId : '';
28 return "bc{$formId}-{$element}";
29 }
30
31 public function getConversationalMultiCls($element)
32 {
33 $conversationalCls = $this->getConversationalCls($element);
34 $clsWithFieldKey = $this->getClassWithFieldKey($element);
35 return "$conversationalCls $clsWithFieldKey";
36 }
37
38 // getter & setter function for $_formId
39 public function getFormId()
40 {
41 return $this->_formId;
42 }
43
44 public function setFormId($formId)
45 {
46 $this->_formId = $formId;
47 }
48 }
49