Can I use WorkflowGen FORM_FIELD_REQUIRED parameter to validate my webform control while the control is dynamically set to invisible by the webform?

Question

Can I use WorkflowGen FORM_FIELD_REQUIRED parameter to validate my web form control while the control is dynamically set to invisible by the web form?

Solution

The WorkflowGen validation will be active as long as the control is valid and visible on the form, with the exception of the GridView control. WorkflowGen validation on GridView controls has a more complex rule that requires the grid view to be visible at all times on the web form.

If a GridView control is set to invisible in the code-behind while you have this control ID set in the FORM_FIELD_REQUIRED parameter, you might receive a JavaScript error (WebResource.axd) when submitting the web form. The form will simply postback and not submit to WorkflowGen.

The JavaScript error message might be similar to the following:

http://[YOUR_COMPUTER]/wfgen/WfApps/Webforms/[YOUR_PROJECT]/WebResource.axd?d=lD2TJz7Vt2T2RayoRVZ-BinkXQFFAPrQQpctrOZGehNVebgW66pLfTxvlvFvhHJ8w9n44cpoBWQdUNbPFL-qpspXcYDwRYk2tgyF604Zae81t=633856863000000000