PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.17.6
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.17.6
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 / API / BitForm_Public / BitForm_Public.php

BitForm_Public.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.17.6, at includes/API/BitForm_Public/BitForm_Public.php

33 lines 776 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace BitCode\BitForm\API\BitForm_Public;
4
5 use BitCode\BitForm\Core\Database\ApiModel;
6
7 class BitForm_Public
8 {
9 public static function getForms()
10 {
11 $db = new ApiModel();
12 $forms = $db->getForm();
13 return $forms;
14 }
15
16 public static function getFields($formId)
17 {
18 $db = new ApiModel();
19 $formData = $db->getField($formId);
20 if (!empty($formData)) {
21 $unset_types = ['paypal', 'razorpay', 'stripe', 'recaptcha'];
22 $formContent = json_decode($formData[0]->form_content);
23 foreach ($formContent->fields as $key => $field) {
24 if (in_array($field->typ, $unset_types)) {
25 unset($formContent->fields->{$key}, $fieldsKey[$key]);
26 }
27 }
28 return $formContent->fields;
29 }
30 return (object) [];
31 }
32 }
33