PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.1
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
ablocks / includes / blocks / form-input / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.1, at includes/blocks/form-input/attributes.php

94 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ABlocks\Blocks\FormBuilder;
3
4 use ABlocks\Controls\Icon;
5 use ABlocks\Controls\Border;
6 use ABlocks\Controls\Range;
7 use ABlocks\Components\ButtonGroup;
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 $attributes = [
13 'block_id' => array(
14 'type' => 'string',
15 'default' => ''
16 ),
17 'inputWidth' => [
18 'type' => 'number',
19 'default' => 100
20 ],
21 'customName' => [
22 'type' => 'string',
23 'default' => '',
24 ],
25 'label' => [
26 'type' => 'string',
27 'default' => 'Name'
28 ],
29 'helperText' => [
30 'type' => 'string',
31 'default' => ''
32 ],
33 'formType' => [
34 'type' => 'string',
35 'default' => ''
36 ],
37 'errorMsg' => [
38 'type' => 'string',
39 'default' => 'This field is required',
40 ],
41 'name' => [
42 'type' => 'string',
43 'default' => ''
44 ],
45 'placeholder' => [
46 'type' => 'string',
47 'default' => 'name'
48 ],
49 'inputType' => [
50 'type' => 'string',
51 'default' => ''
52 ],
53 'isRequired' => [
54 'type' => 'boolean',
55 'default' => true
56 ],
57 'nameChangeable' => [
58 'type' => 'boolean',
59 'default' => true
60 ],
61 'showIcon' => [
62 'type' => 'boolean',
63 'default' => false
64 ],
65 'iconColor' => [
66 'type' => 'string',
67 'default' => ''
68 ],
69 ];
70
71 $attributes = array_merge(
72 $attributes,
73 Border::get_attribute( 'border', true ),
74 Icon::get_attribute('icon', [
75 'size' => 28,
76 ] ),
77 ButtonGroup::get_attribute( 'emailType', false, [
78 'value' => 'email',
79 ] ),
80 Range::get_attribute( [
81 'attributeName' => 'inputIconSize',
82 'isResponsive' => false,
83 'defaultValue' => 28,
84 ] ),
85 Range::get_attribute( [
86 'attributeName' => 'inputIconSpace',
87 'isResponsive' => false,
88 'defaultValue' => 38,
89 ] ),
90 );
91
92 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
93
94