Reputation: 99
I can able to validate all the fields like email, password etc. But if I try to display any custom error messages it not showing only the default message is showing. I'm using 'Web Forms for Marketers 8.1 rev. 151008'. Please help me.
Upvotes: 0
Views: 1589
Reputation: 11
This is how I fixed for Sitecore 8.1 :
Go to the View of the field type you are using and customize it. like :
{
var datValidateValue = Model.Parameters.ContainsKey("predefinedvalidatortextmessage")? Model.Parameters["predefinedvalidatortextmessage"]: string.Empty;
}
//Razor
@Html.TextBoxFor(m => m.Value, new { data_val_multiregex = dataValidateValue })
Please let me know if any other answers to this question worked.
Thanks, Akshansh
Upvotes: 0
Reputation: 2047
Unfortunately the most suitable resolution to your issue is to upgrade to a newer version of Sitecore.
The version Sitecore you are using has some serious issues when used with WFFM meaning much of the base functionality of WFFM does not work correctly.
Sitecore have acknowledged these compatability issues between Sitecore 8.1 rev 151003 and WFFM 8.1 rev 151008. They are even recommending anyone on Sitecore 8.1 rev 151003 to upgrade as soon as possible.
It's not the simple answer you are looking for but it avoids you trying to decompile code and get it working on your own. From my experience, much of my functionality didn't work with the Initial Release of 8.1 but works within 8.1 Update 1.
Upvotes: 1
Reputation: 7249
I have Sitecore 8 update 2 and I can suggest looking in these locations to modify the error message.
/sitecore/system/Modules/Web Forms for Marketers/Settings/System/System Validation/NotEmpty
Here in the NotEmpty item you need to modify Error Message
field
/sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/Simple Types
Here in the Field Type such as /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/Simple Types/Single-Line Text
you need to modify Localized Parameters
field. Check for xml tag DynamicRequiredErrorMessage
in the field value.
I hope this helps.
Upvotes: 1