After failed validation, empty always captcha input field

2011-07-01 Thread heohni
Hi, I would like to have always my captcha input empty, especially on reload because of validation error. I thought I can do this with 'empty'= true, but the input will always show always the last value. Is there a better solution? -- Our newest site for the community: CakePHP Video Tutorials

Re: After failed validation, empty always captcha input field

2011-07-01 Thread Thomas Ploch
Hello, just set $this-data['Model']['captcha_field'] = null if your validation fails. This way the field will be empty in the view. Dunno what key 'empty' you mean, since validation rules don't have an 'empty' key available. Regards, Thomas Am Freitag, den 01.07.2011, 04:18 -0700 schrieb

Re: After failed validation, empty always captcha input field

2011-07-01 Thread Jeremy Burns | Class Outfit
He's referring to the Form-input option. This makes it empty on first form display, but is then populated with the value from $this-data after validation, so Thomas' idea is the right one. Jeremy Burns Class Outfit http://www.classoutfit.com On 1 Jul 2011, at 12:28, Thomas Ploch wrote:

Re: After failed validation, empty always captcha input field

2011-07-01 Thread Jeremy Burns | Class Outfit
You could also do 'value' = '' on the form. Jeremy Burns Class Outfit http://www.classoutfit.com On 1 Jul 2011, at 13:10, Jeremy Burns | Class Outfit wrote: He's referring to the Form-input option. This makes it empty on first form display, but is then populated with the value from

Re: After failed validation, empty always captcha input field

2011-07-01 Thread heohni
OK thanks!! On 1 Jul., 13:28, Thomas Ploch profipl...@googlemail.com wrote: Hello, just set $this-data['Model']['captcha_field'] = null if your validation fails. This way the field will be empty in the view. Dunno what key 'empty' you mean, since validation rules don't have an 'empty' key