Home › Forums › Classic DFFS › Set dffsValidation with js (Display this message)
- This topic has 7 replies, 2 voices, and was last updated 5 years, 6 months ago by becca.
-
AuthorPosts
-
-
May 16, 2019 at 22:30 #25301
How do I add, remove, and set the dffsValidation message for a field in js?
-
May 17, 2019 at 07:51 #25305
You cannot change it for individual fields, but you can change the text used by adding this to your custom js:
var dffsRequiredFieldValidation = "This is the new message for required fields!";
Alexander
-
May 20, 2019 at 15:43 #25335
I think we might be talking about slightly different usages, what you gave me is for if you save without filling out required fields, what I’m looking for is when this is used like an alert (e.g. rule is triggered, sets and shows Display this message).
-
May 20, 2019 at 16:03 #25337
For example, when I inspected one made from a rule on another form, the js path I could copy from it was (‘#field_internal_name_dffsValidation’), different from dffsformvalidation. But I can’t seem to get the right phrasing to set this for a field in the form I’m currently working on.
-
May 20, 2019 at 21:34 #25342
I see. This placeholder is created on the fly when a validation happens and isn’t there if the validation message isn’t showing.
What is it you like to do exactly? – if you only need to insert your own custom message the format is like this:
jQuery("#dffs_Color td.ms-formbody").append("<div id='myCustomMessageID' style='color:red;'>Your custom message</div>"); // Use this to remove it again jQuery("#myCustomMessageID").remove();
Alexander
-
May 21, 2019 at 17:48 #25363
I have a field on tab 1 that effects whether a field in tab 3 is editable or not by a different type of user. I want to clarify why that field isn’t editable to the higher permission users without displaying anything to the general users.
-
May 21, 2019 at 19:03 #25365
This works as intended on td.ms-formbody but not on td.dffs-readonly-inner, how should I modify this to work when also using doReadOnly on the field?
-
May 21, 2019 at 19:53 #25367
Nvm that last message, for this appending it to ms-formlabel works fine.
-
-
AuthorPosts
- You must be logged in to reply to this topic.