Rohit,

For such a situation as yours, I use a ViewScript decorator to customize my
whole form so that I have complete control over the display of each and
every element and their error, description, and label.

You want to display a single error, then assign the same error to all three
elements. In your ViewScript, perform a simple if-else to check if first
element's error exists. If not, check for existence of second element's
error but print them only once.

I know this is a crude method of doing this, but it works like a charm for
me.

Hope this makes sense.

Jerry



Rohit83 wrote:
> 
> Hi All
> I have one field as shown in figure below,for this field i used three text
> elements of form.
>  http://www.nabble.com/file/p17879496/Screenshot.png 
> Now in this case all the elements of this field is required,
> and i want if one or more elements are empty then display only one error
> for them
> please anybody suggest me how to do that 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Errors-display-tp17879496p17881565.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to