As a developer and web designer, the most frustrating part I have found is when working with forms.
Long time ago (about 2 years now) I start putting togheter few PHP function trying to make my life a lot easier, but never got the time to finish it off.
Finally I have put everything on the side and got cracking on this due to a new project that involves the making a few very long forms.
The thought of writing all the html code (tables or DIVs) and validate them made me go back to this little project and decided to give it more thoughts.
This is the first release of the PHP code for this project so, if you would like to give it a bash and make use of it please do so…
A sample can be found here: SAMPLE PHP FORM
Some of the features:
- Choice of using TABLE or DIVs for layout
- You can create more than one form on the same page making sure the right one is validated on submission
- Basic form validation
- Option to make the field required or not
- Show ERROR message beside the required field – standard
- Option to set the ERROR message text – set to REQUIRED in the sample form
- Show ERROR message at the top of the form as well - optional
- Cuts form creation time in more than half
- Automatically sets the values of the field after posting the form
- and much more…
If you find any errors and anything that could help improve the functionality of this project, please leave a comment and I’ll make sure it gets done ASAP.