-- J DeBord <[email protected]> wrote
(on Sunday, 12 April 2009, 12:16 PM +0200):
> Currently when an invalid value is entered, the ValidationTextBox changes 
> color
> and displays a "Caution sign" graphic inside of it.  The invalidMessage does
> not display until the user clicks inside the textBox. Is there anyway to cause
> the invalidMessage to display at the same time the "Caution sign" graphic
> displays?

You might want to ask on the Dojo mailing lists to find out what dijit
attribute controls this. Then all you need to do is set it as a
parameter in your element creation.

> class Forms_NewsletterSubscribeForm extends Zend_Dojo_Form {
>    
>     public function __construct($options = null) {
>        
>         parent::__construct($options);
>        
>         $this->setAttrib('id','newsletterSubscribe');
>        
>         $this->addElement('ValidationTextBox', 'n_email', array(
>             'required'      => true,
>             'validators'     => array('EmailAddress'),
>             'filters'         => array('StringToLower'),
>             'regExp'        => '^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@
> ([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$',
>             'promptMessage'    => '[email protected]',
>             'invalidMessage'=> 'A Valid Email is Required'
>         ));
>        
>         $this->addElement(
>             'SubmitButton',
>             'submit',
>             array(
>                 'label'        => 'Submit',
>             )
>         );
>        
>     }
>    
> }

-- 
Matthew Weier O'Phinney
Software Architect      | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to