PluginProbe
The Innovative Form Builder – IvyForms / 0.3.1
The Innovative Form Builder – IvyForms v0.3.1
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.3.1, at backend/src/Services/Template/ContactFormTemplate.php

104 lines 3.7 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 'type' => 'text',
35 'label' => 'First Name',
36 'placeholder' => 'Enter your first name',
37 'required' => true,
38 'validation' => [
39 'required' => true,
40 ],
41 'settings' => [
42 'css_class' => 'ivyforms-field-first-name'
43 ]
44 ],
45 [
46 'id' => 'last_name',
47 'type' => 'text',
48 'label' => 'Last Name',
49 'placeholder' => 'Enter your last name',
50 'required' => true,
51 'validation' => [
52 'required' => true,
53 ],
54 'settings' => [
55 'css_class' => 'ivyforms-field-last-name'
56 ]
57 ],
58 [
59 'id' => 'email',
60 'type' => 'email',
61 'label' => 'Email Address',
62 'placeholder' => 'Enter your email address',
63 'required' => true,
64 'validation' => [
65 'required' => true,
66 'email' => true
67 ],
68 'settings' => [
69 'css_class' => 'ivyforms-field-email'
70 ]
71 ],
72 [
73 'id' => 'subject',
74 'type' => 'text',
75 'label' => 'Subject',
76 'placeholder' => 'What is this regarding?',
77 'required' => false,
78 'validation' => [
79 'required' => false,
80 ],
81 'settings' => [
82 'css_class' => 'ivyforms-field-subject'
83 ]
84 ],
85 [
86 'id' => 'message',
87 'type' => 'textarea',
88 'label' => 'Message',
89 'placeholder' => 'Please enter your message here...',
90 'required' => false,
91 'validation' => [
92 'required' => false,
93 ],
94 'settings' => [
95 'css_class' => 'ivyforms-field-message'
96 ]
97 ]
98 ],
99 'settings' => []
100 ]
101 ];
102 }
103 }
104