Ian Rickert wrote:
>
> Matthew Weier O'Phinney-3 wrote:
>>
>> Just a note -- this will set a maximum of 5 characters, not 500, as you
>> state you'd like to have.
>>
>>
>
> Ah, yes. Of course. I had changed it to make testing easier, but forgot to
> change it back for this post.
>
>
>
> Matthew Weier O'Phinney-3 wrote:
>>
>> Zend_Form validators are only called when the form is submitted;
>> they do not affect client-side operations.
>>
>>
>
> Ah... so is there a way to do it the way that ValidationTextBox does it,
> with the alert symbol, turning yellow, displaying an error message? So that
> when the user exceeds 500 characters, it displays an error message?
>
>
> Matthew Weier O'Phinney-3 wrote:
>>
>> Everything above looks correct; can you indicate what data passed to the
>> form does not validate? That will potentially give me a reproduce case.
>>
>>
>
> I'm a little unsure what you mean by this; I have basically been loading up
> the page and then slapping a few random characters ("fdsagfdsa") into the
> textarea, nothing fails validation (I believe because it doesn't actually
> check)...
>
>
> If it is related to the submit button, here's my code for that... perhaps
> the problem is in there?
>
> $el = new Zend_Dojo_Form_Element_SubmitButton("sb_SendForm2");
> $el->setLabel("Submit??")
> ->setRequired();
> $this->addElement($el);
>
>
> Well, I've put what I have up on the web. The textarea in question is
> labeled "Describe the Event". Also included are Zend_Debug dumps of the
> Textarea and SubmitButton.
>
> http://fairmountfair.com/CalendarSubmissions/public/
>
> Thanks so much! I really appreciate your work.
>
> Ian
>
>
>
Hi Ian,
If the form is submitted it would be checked and validated.
If you want to interact with the content of the textarea during the "client
phase" you must interact with the browser and this
is done by a javascript you could attach on the textarea.
Google is your friend
something like this
http://www.tutorialstream.com/tutorials/javascript/check-textarea-length/
--
Bruno Friedmann