Articles tagged with form

JS Vaildator

By Garth Braithwaite
This helper generates JavaScript validation based on the model's validate array, and also offers a few extra features.
These features include:
Server: a Ajax script to validate one field server-side (this was originally designed to make sure a field is unique on the table ie username or email)
Confirm: to check that two or more fields are equal (designed for password fields or to confirm email accounts)
Custom required fields: if you don't want to use strictly the model's validate array or if you want to append a few fields that may not actually appear in the array

Currently the validator uses a JavaScript alert to let user know what changes need to be made, but I am going to make it optional to have the results returned in a div tag of your choice as a unordered list. Until I finish that this will get you started.

Please let me know if this helps anyone, or how I could improve it.
[Read more]

Country Select List Helper

By Tane Piper
If you are having users register for your site, especially a customer - you may want to know their country of residence. Instead of having to create a select list and manually enter each country - this handy helper does it for you all.

[Read more]

Rails-like Data Validation

Captcha component with PhpCaptcha

By Spout
PhpCaptcha is a library for generating visual and audio CAPTCHAs (completely automated public Turing test to tell computers and humans apart).
[Read more]

Using Custom Validation Rules To Compare Two Form Fields

By Aran Johnson
Want to make sure that two submitted form fields have the same value? Use the ability to write your own validation rules, to add this validation to your model.
[Read more]

Using Security Component and multi Checkboxes

By foxmask
As i did not find the way to do it with the Cake FormHelper i will detail what i did and why.

The helper PcformHelper is usefull when you want to use the Security Component, and need to create an array of checkboxes.
[Read more]