PluginProbe
The Innovative Form Builder – IvyForms / 0.4
The Innovative Form Builder – IvyForms v0.4
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Services / Template / ContactFormTemplate.php

ContactFormTemplate.php in The Innovative Form Builder – IvyForms 0.4, at backend/src/Services/Template/ContactFormTemplate.php

109 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace IvyForms\Services\Template;
6
7 use IvyForms\Services\Translations\BackendStrings;
8
9 class ContactFormTemplate
10 {
11 /**
12 * Get the contact form template
13 *
14 * @return array<string, mixed>
15 */
16 public static function getTemplate(): array
17 {
18 return [
19 'id' => 'contact_form',
20 'name' => BackendStrings::getTemplateStrings()['contact_form'],
21 'description' => BackendStrings::getTemplateStrings()['contact_form_desc'],
22 'category' => 'basic',
23 'is_pro' => false,
24 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'contact-form.svg',
25 'form_data' => [
26 'name' => 'Contact Form',
27 'description' => 'Get in touch with us using this contact form',
28 'published' => 1,
29 'showTitle' => 1,
30 'storeEntries' => 1,
31 'fields' => [
32 [
33 'id' => 'first_name',
34 'fieldIndex' => 1,
35 'type' => 'text',
36 'label' => 'First Name',
37 'placeholder' => 'Enter your first name',
38 'required' => true,
39 'validation' => [
40 'required' => true,
41 ],
42 'settings' => [
43 'css_class' => 'ivyforms-field-first-name'
44 ]
45 ],
46 [
47 'id' => 'last_name',
48 'fieldIndex' => 2,
49 'type' => 'text',
50 'label' => 'Last Name',
51 'placeholder' => 'Enter your last name',
52 'required' => true,
53 'validation' => [
54 'required' => true,
55 ],
56 'settings' => [
57 'css_class' => 'ivyforms-field-last-name'
58 ]
59 ],
60 [
61 'id' => 'email',
62 'fieldIndex' => 3,
63 'type' => 'email',
64 'label' => 'Email Address',
65 'placeholder' => 'Enter your email address',
66 'required' => true,
67 'validation' => [
68 'required' => true,
69 'email' => true
70 ],
71 'settings' => [
72 'css_class' => 'ivyforms-field-email'
73 ]
74 ],
75 [
76 'id' => 'subject',
77 'fieldIndex' => 4,
78 'type' => 'text',
79 'label' => 'Subject',
80 'placeholder' => 'What is this regarding?',
81 'required' => false,
82 'validation' => [
83 'required' => false,
84 ],
85 'settings' => [
86 'css_class' => 'ivyforms-field-subject'
87 ]
88 ],
89 [
90 'id' => 'message',
91 'fieldIndex' => 5,
92 'type' => 'textarea',
93 'label' => 'Message',
94 'placeholder' => 'Please enter your message here...',
95 'required' => false,
96 'validation' => [
97 'required' => false,
98 ],
99 'settings' => [
100 'css_class' => 'ivyforms-field-message'
101 ]
102 ]
103 ],
104 'settings' => []
105 ]
106 ];
107 }
108 }
109