Hello,
I have a question (actually, it’s a point i have been stuck with for several days) regarding disabled DynamicForm
For example, the ‘FormSplitting’ example : http://www.smartclient.com/index.jsp#formSplitting
If I set one of the forms to be disabled, for example ‘form0’
<ValuesManager ID="vm"/>
<VLayout width="400" height="300" membersMargin="10">
<members>
<TabSet ID="theTabs" height="250">
<tabs>
<tab title="Item">
<pane>
<DynamicForm ID="form0" valuesManager="vm" disabled="true">
<fields>
<field name="itemName" type="text" title="Item"/>
<field name="description" type="textArea" title="Description"/>
<field name="price" type="float" title="Price" defaultValue="low"/>
</fields>
</DynamicForm>
</pane>
</tab>
<tab title="Stock">
<pane>
<DynamicForm ID="form1" valuesManager="vm">
<fields>
<field name="inStock" type="checkbox" title="In Stock"/>
<field name="nextShipment" type="date" title="Next Shipment"
useTextField="true" defaultValue="256"/>
</fields>
</DynamicForm>
</pane>
</tab>
</tabs>
</TabSet>
<Button title="Submit">
<click>
vm.validate();
if (form1.hasErrors()) theTabs.selectTab(1);
else theTabs.selectTab(0);
</click>
</Button>
</members>
</VLayout>
The DynamicForm0 is still being validated and it’s values sent to the server (or are there when i do a
vm.getValues ()
) even when it’s disabled. Which surprised me since in HTML, the values of a form are not sent when it is disabled.
Is there a way to prevent the validation and the values being sent to the server ?
I tried many methods to find a turnaround without having to generate a “gas factory” but none yielded the required result.
Thank you