Jump to content

Changing error message pattern for customfield validator


Webmaster001

Recommended Posts

We have an ajaxcart orderform. We also have some custom field in the product which is validated by a validation string. The language tag which is called for this is $_LANG['customfieldvalidationerror']

 

For example, the current error message for a custom field with the name "Age" is "Age Value is not valid" however we want to change that to "Please enter a valid Age".

 

Thus we need to change the pattern the customfieldvalidationerror is shown. Which tpl file is calling this message that we can alter? Or perhaps it needs to be changed somewhere else.

 

We already changed the $_LANG['customfieldvalidationerror'] however the pattern shows the name of the custom_field first. For example the message is shown right now is "Age Please enter a valid".

Link to comment
Share on other sites

the pattern is fixed within WHMCS and can't be altered directly - you could tweak it to get it to say "Please enter a valid Age" by editing configureproduct.tpl for the non-ajax order forms (most of them apart from ajaxcart, modern and slider).

 

however, for the ajaxcart, I think the error message is displayed using jquery in the pattern determined by WHMCS - so you may need to find a method that modifies the javascript.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated