PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 1.1.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v1.1.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 2.10.2 All 137 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.1.1, at includes/Frontend/Form/View/Theme/ThemeBase.php

57 lines 1.7 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 'paypal':
35 return $this->paypal($field, $rowID, $field_name, $error, $value, $formID);
36 case 'submit':
37 return $this->submitBtns($field, $rowID, $field_name, $error, $value, $formID);
38 default:
39 break;
40 }
41 }
42
43 protected function setTag($tag, $value, $attr = null)
44 {
45 echo "<$tag $attr>" . esc_html($value) . "</$tag>";
46 }
47
48 protected function setAttribute($attr, $value = null)
49 {
50 echo " $attr='" . esc_attr($value) . "' ";
51 }
52 protected function setSingleValuedAttribute($attr)
53 {
54 echo " $attr ";
55 }
56 }
57