PDA

View Full Version : Validate form with hidden panel



tameshwar
15 May 2012, 7:42 AM
i have two panels which is hiding and showing base on the key event.
While panel is hidden and i clicked on submit button to save the form data its not post the form.
bcoz of the one of the field is required in the hidden panel.

Please suggest me..

How can i pass the validation in hidden panel.?

scottmartin
15 May 2012, 12:45 PM
Add the following to your tabPanel so all fields are sent.
deferredRender: false

Regards,
Scott.

tameshwar
15 May 2012, 10:36 PM
Hi Scottmartin,

Thanks for you quick response,
i have already added deferredRender:false to tabPanel but still i am facing the problem.

Please suggest me what i have to do, to resolve it.

sword-it
16 May 2012, 1:08 AM
Hi,
I guess you are using 'allowBlank:false' as a confiig in your field which is in hidden panel.

Simply, in the save function, before validating your form, change allowBlank of your field.



YourMandatoryField.allowBlank=true;


Or, you may perform this when you are hiding your panel instead of save function..

then,it will not create any mishaps in validation.....

tameshwar
16 May 2012, 2:29 AM
Thanks
Sword-IT

its working.............=D>