CI4 Form Builder Lib |
Hi there,
I developed a lib called "Ci4FormBuilder", which helps to create forms (and their components) in an object-oriented way. The repository and documentation can be accessed at the following link. https://github.com/rafaelwendel/CI4FormBuilder Suggestions are welcome!
Good news, thanks for sharing.
I think this approach complicates the work with forms. In fact, this is a wrapper over helpers.
Does this solution have any advantage?
(06-24-2023, 05:45 PM)iRedds Wrote: I think this approach complicates the work with forms. In fact, this is a wrapper over helpers. Hello IRedds, I developed this lib for a personal project, and it helped me in aspects like: - Define (or edit) the forms template and its components in an easier way, like before and after <form> tag (to add for example an alert with success/error message of a submit), before and after each field, styles of message validation errors, ... - Easy to set the field structure (with its label, and inside a "<div>"). If necessary, I change the template and all fields will be changed (or each field can be its own template) - Set the field values just by passing PHP Code: $this->request->getPost() PHP Code: $userModel->find(1) - Just set PHP Code: $validation->getErrors() Anyway. I hope it can be an a good alternative! Thanks!
Thank you for sharing!
This is an OOP way to build forms. It would help coding when we don't like to write HTML forms in Views. |
Welcome Guest, Not a member yet? Register Sign In |