Zebra_Form is a PHP class that simplifies the process of creating and validating HTML forms. Its object-oriented structure promotes rapid HTML forms development and encourages developers to write clean and easily maintainable code. It frees the developers from the repetitive task of writing the code for validating forms by offering powerful built-in client-side and server-side validation. Zebra_Form has an integrated cross-site scripting prevention mechanism that automatically strips out potentially malicious code from the submitted data. It also prevents automated SPAM posts, out of the box and without relying on CAPTCHA by using honey pots. Output can be generated either automatically or manually through templates (basic PHP files). When generated automatically, the generated output has the same look and feel across all major browsers. It provides all the controls you’d expect in an HTML form and, additionally, date/time pickers, captcha, and AJAX-like file upload controls.
| Tags | PHP forms form Library Libraries classes Class |
|---|---|
| Licenses | LGPL |
| Operating Systems | OS Independent |
| Implementation | PHP |
Recent releases


Release Notes: In this version, a bug was fixed where using multiple forms on a single page would disable client-side validation for all forms but the first one. A bug was fixed where if there were selection groups in a select, it would never pass validation. A bug was fixed where placeholders (labels as hints inside textboxes and textareas) were not working on textareas. Elements that have display:none or visibility:hidden are no longer checked in the client-side validation process. The Zebra_Transform plugin is no longer included in the library; it can be downloaded and used separately if needed.


Release Notes: Another bug that would make date validation impossible in certain scenarios was fixed. Some minor updates were made to the JavaScript code.


Release Notes: A bug was fixed where dates having the day < 10 would not pass validation. An issue was fixed that allowed malicious users to submit arbitrary values instead of the ones defined at the form’s creation for select controls, checkboxes, and radio buttons. The severity of the issue was low, as the submitted values were still filtered for cross-site scripting (XSS) attempts, so no real harm could be done.


Release Notes: A bug was fixed where dates would never validate for languages other than English. The form now completely adheres to http://www.w3.org/TR/WCAG20-TECHS/H44.html, which requires that all controls have an associated label. Previously, the honeypot element did not have an associated label. Some minor optimizations were done in the PHP code as well as some clarifications in the documentation regarding the "resize" rule.


Release Notes: A new validation rule was added called "filetype". With this rule one can restrict the types of files that can be uploaded by specifying a list of allowed file extensions. It's important to note that validation is not done by file extension but by the MIME type of the uploaded files. For this, a new file is available in the root of the library called "mimes.json", and this contains the currently supported extensions and associated MIME types. The library now makes use of the Zebra_TransForm jQuery plugin to replace radio buttons, check boxes, and select boxes with nicer ones.