PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 1.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v1.3
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 / Theme / ThemeBase.php

ThemeBase.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 1.3, at includes/Frontend/Form/View/Theme/ThemeBase.php

63 lines 2.0 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\Theme;
4
5 class ThemeBase
6 {
7 public function getField($field, $rowID, $field_name, $error = null, $value = null, $formID = null)
8 {
9 switch ($field->typ) {
10 case 'text':
11 case 'number':
12 case 'password':
13 case 'email':
14 case 'url':
15 case 'date':
16 case 'datetime-local':
17 case 'time':
18 case 'month':
19 case 'week':
20 case 'color':
21 return $this->textField($field, $rowID, $field_name, $error, $value, $formID);
22 case 'textarea':
23 return $this->textArea($field, $rowID, $field_name, $error, $value, $formID);
24 case 'check':
25 return $this->checkBox($field, $rowID, $field_name, $error, $value, $formID);
26 case 'radio':
27 return $this->radioBox($field, $rowID, $field_name, $error, $value, $formID);
28 case 'select':
29 return $this->dropDown($field, $rowID, $field_name, $error, $value, $formID);
30 case 'file-up':
31 return $this->fileUp($field, $rowID, $field_name, $error, $value, $formID);
32 case 'recaptcha':
33 return $this->recaptcha($field, $rowID, $field_name, $error, $value, $formID);
34 case 'decision-box':
35 return $this->decisionBox($field, $rowID, $field_name, $error, $value, $formID);
36 case 'html':
37 return $this->html($field, $rowID, $field_name, $error, $value, $formID);
38 case 'paypal':
39 return $this->paypal($field, $rowID, $field_name, $error, $value, $formID);
40 case 'razorpay':
41 return $this->razorPay($field, $rowID, $field_name, $error, $value, $formID);
42 case 'submit':
43 return $this->submitBtns($field, $rowID, $field_name, $error, $value, $formID);
44 default:
45 break;
46 }
47 }
48
49 protected function setTag($tag, $value, $attr = null)
50 {
51 echo "<$tag $attr>" . esc_html($value) . "</$tag>";
52 }
53
54 protected function setAttribute($attr, $value = null)
55 {
56 echo " $attr='" . esc_attr($value) . "' ";
57 }
58 protected function setSingleValuedAttribute($attr)
59 {
60 echo " $attr ";
61 }
62 }
63