PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 1.2.4
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v1.2.4
6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 3.6.66 All 195 releases
fluentform / app / Modules / Form / Inputs.php

Inputs.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 1.2.4, at app/Modules/Form/Inputs.php

39 lines 907 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules\Form;
4
5 use FluentForm\App\Modules\Acl\Acl;
6 use FluentForm\App\Services\FormParser;
7 use FluentForm\Framework\Foundation\Application;
8
9 class Inputs
10 {
11 /**
12 * @var \FluentForm\Framework\Request\Request
13 */
14 private $request;
15
16 /**
17 * Build the class instance
18 * @throws \Exception
19 */
20 public function __construct(Application $application)
21 {
22 Acl::verify('fluentform_forms_manager');
23
24 $this->request = $application->request;
25 }
26
27 /**
28 * Get all the flatten form inputs
29 * @return void
30 */
31 public function index()
32 {
33 $formId = $this->request->get('formId');
34
35 $form = wpFluent()->table('fluentform_forms')->find($formId);
36 $fields = (new FormParser($form))->getEntryInputs(array('admin_label', 'attributes', 'options'));
37 wp_send_json($fields, 200);
38 }
39 }