SaaS CMS has officially launched! Learn more now.

Disable email validation i Xforms editor



If the submit button in the Xforms is configured to send the result to an email address you get to enter a sender e-mail address and a receiver email address. When the form is saved these fields are validated as email addresses. I would like to disable this validation. Is that possible?

Bakground: I want the sender email address to be a field in the form. To connect the email sender address to a form I would like to use a variable %%field_name%%, but %%field_name%% is not a valid email adress. Validation fails, and the form cannot be saved.


May 23, 2012 11:55

The only way I can see is to remove the validation directly in the user control. It's located in the ui folder, in my case C:\Program Files (x86)\EPiServer\CMS\\Application\UI\CMS\Edit\XFormFieldProperty.ascx. The button where you want to remove the validation is:

<EPiServerUI:ToolButton id="ButtonSaveButton"  Text="<%$ Resources: EPiServer, %>" runat="server" OnClientClick="if( validateEmail( 'FormEmailRecipient', '___erroremail' ) && validateEmail( 'FormEmailSender', '___erroremail' ) ){fieldPropertiesSubmitSave();}"  GeneratesPostBack="false" />


May 23, 2012 13:43
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.