Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Modifying validation/error text alerts/helper text.

  • cheeseburger
  • cheeseburger's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 11 months ago #211584 by cheeseburger
Hello everyone,
I have a goal to modify the text that displays when a user keys in non-numeric values within a numeric-only type of field. Within various TWIGs I see the following type of directional text:

- The validation message, eg: "Only numbers may be entered in this field.". This text is inside EM Helper, and can be changed by creating a translation file
- The easiest way to change the text in the warnings is to create a new translation.

In previous surveys, I've easily modified the content in the DOM using JS.
In other surveys, I've modified the core PHP files (which I'd like to avoid).

Currently, I'd like to see if there is a different method using some other area that I've yet to find. I searched in various places for "EM Helper", "Translation File", "Validation Message", etc and am not finding anything. 

Thanks for your help!
 
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 11 months ago #211599 by DenisChenu
1: hide the default in custom.css :
Code:
.question-container.numeric .ls-em-tip.em_default{display:none}
2. Set validation to
Code:
is_numeric(self.NAOK) or is_empty(self.NAOK)
3. Use your own string in validation tip1: hide the default in custom.css :
Code:
.question-container.numeric .ls-em-tip.em_default{display:none}



Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: ruytterm
The topic has been locked.
  • cheeseburger
  • cheeseburger's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 11 months ago #211622 by cheeseburger
Replied by cheeseburger on topic Modifying validation/error text alerts/helper text.
Thank you DenisChenu! I will explore this immediately. Always appreciate your time.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose