sudheer muhammed
sudheer muhammed

Reputation: 99

Custom error message not showing in WFFM module for sitecore

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.

This is what I set

And this what i am getting

Upvotes: 0

Views: 1589

Answers (3)

Akshansh Dwivedi
Akshansh Dwivedi

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

Jonathan Robbins
Jonathan Robbins

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

Harsh Baid
Harsh Baid

Reputation: 7249

I have Sitecore 8 update 2 and I can suggest looking in these locations to modify the error message.

  1. Modify the system validation for Required Field validation /sitecore/system/Modules/Web Forms for Marketers/Settings/System/System Validation/NotEmpty

Here in the NotEmpty item you need to modify Error Message field

  1. Modify the Dynamic Required Field Message at field type level /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

Related Questions