I am using the Module Creator module within DotNetNuke to create a very basic contact form. The form works as intended, but I'm having trouble with the validation.
When one submits the form without properly filling out the required fields, it invokes the form validation and displays the appropriate error messages. However, if I'm not trying to fill out the form and instead am selecting admin features of DotNetNuke to administer the site, the form validation for my custom module fires and prevents me from using the core functionality...
How do I prevent my form from being submitted when DotNetNuke admin functionality is what is being clicked?
Thanks for any help provided.
Solution is ValidationGroup
Use the validationgroup on your controls that has to be checked and at the validationgroup to your button.
Control with Requiredfieldvalidator:
<asp:textbox id="tbName" runat="Server"/>
<asp:requiredfieldvalidator id="rfvName" controltovalidate="tbName" validationgroup="Save" errormessage="Enter your name."
runat="Server"/>
Button:
<asp:LinkButton ID="lbSave" ValidationGroup="Save" resourcekey="cmdAdd" runat="server" class="dnnPrimaryAction" OnClick="Onclick_lbSave" /></li>