File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,37 @@ public function handleForm()
104104}
105105```
106106
107+ ## Available Fields
108+
109+ ``` php
110+ // All fields has the following common arguments:
111+ $args = [
112+ PHPForm\Widgets\Widget $widget,
113+ string $label = null,
114+ string $help_text = '',
115+ bool $required = false,
116+ bool $disabled = false,
117+ mixed $initial = null,
118+ array $validators = array(),
119+ array $widget_attrs = array(),
120+ array $error_messages = array()
121+ ]
122+
123+ // Fields available
124+ // '...' represents common fields
125+
126+ new BooleanField([...]);
127+ new CharField([int $max_length, int $min_length, ...]);
128+ new ChoiceField([array $choices, ...]);
129+ new DateField([string $format, ...]);
130+ new DateTimeField([string $format, ...]);
131+ new EmailField([...]);
132+ new FileField([int $max_size, array $valid_filetypes, ...]);
133+ new IntegerField([int $max_value, int $min_value, ...]);
134+ new URLField([...]);
135+
136+ ```
137+
107138## Starting development
108139Start by cloning the repo:
109140
You can’t perform that action at this time.
0 commit comments