Sep 15, 2014, 9:14 PM
[CLOSED] Form validation including form on user control
We have a <ext:FormPanel> which includes a <ext:Panel> which includes a user control. The user control has a grid and a form which the user enters to add a new row into the grid. The form on the user control has 2 required fields - but they are only required for the "Add" function into the grid. They should not affect the validation of the outer form panel.
Psuedo code for the form panel layout:
I am upgrading from 1.x to 2.5 and found this issue. I do not want to have to redo the entire layout by putting a form around each set of widgets on the page that are not a user control to validate the parent form.
Thanks,
Psuedo code for the form panel layout:
<ext:FormPanel id='fred'>
.......form widgets here.
<ext:Panel>
<ext:PartialRender.....user control......../>
</ext:Panel>
.....form widgets here
</ext:FormPanel>
Psuedo code for the user control: <ext:Panel...
<ext:GridPanel.....</ext:GridPanel>
<ext:FormPanel>
<ext:TextField.....Last name - required/>
<ext:Button .... add button - adds to the grid/>
</ext:FormPanel>
</ext:Panel>
So if I test 'fred'.isValid() it will say false because of the required fields on the form panel in the user control. I want to be able to exclude the user control from the isValid(). The prior version 1.x did not do this. I am upgrading from 1.x to 2.5 and found this issue. I do not want to have to redo the entire layout by putting a form around each set of widgets on the page that are not a user control to validate the parent form.
Thanks,
Last edited by Daniil; Sep 26, 2014 at 12:17 PM.
Reason: [CLOSED]