Form Generator
generate form object with elements
form-generator
Generate your sample Laminas Form for given module and name. Pass a list of elements to populate desired fields.
On-line Generator
Setup Instructions
- Ensure you have module called: %module% in your application.
- Create a PHP file called %name%Form.php in: [root]/module/%module%/form/ and paste the contents from above.
Throubleshooting
Make sure your application contains all the required plugins from "Required Laminas Components" and "Required Laminas Kit Components".
You can learn how to add missing dependencies in this video:
You can learn how to add missing dependencies in this video:
Parameters
Param name | Type | Default value | Description |
---|---|---|---|
name | text | NULL | Sets a form name |
module | text | NULL | Sets a module name |
properties | array | NULL | Sets form's elements |
CLI Usage
"vendor/bin/laminas.bat" mvc:form --properties=<action1> --properties=<action2> --module=<moduleName> <name>
Example Usage
"vendor/bin/laminas.bat" mvc:form --properties=add --properties=update --properties=delete --module=Application Users