Change default unique value message

Forums Dynamic Forms for SharePoint Change default unique value message

This topic contains 2 replies, has 2 voices, and was last updated by  Alexander Bautz 4 months, 2 weeks ago.

  • Author
  • #22297


    Is there a way within DFFS to modify the default error message for a unique value field?

    Searched online but all of the examples require adding a webpart to the newform page and I’m not sure how to translate those over for custom JS or if there was a DFFS value I could use.

    Here’s one of the examples:

    <a href="http://[yoursource]/jquery-1.11.2.min.js">http://[yoursource]/jquery-1.11.2.min.js</a>
    $("span[class=ms-formvalidation]:contains('This value already exists')").text('[Insert whatever message you want here...]');
    • This topic was modified 4 months, 2 weeks ago by  CinderGirl.
    • This topic was modified 4 months, 2 weeks ago by  CinderGirl.
  • #22303


    Sigh… I keep putting the block of code in, selecting it, then click the CODE button and it puts apostrophes around it, but when I save it still changes the code. Just FYI since it looks funky.

  • #22323

    Alexander Bautz

    The problem is that this error doesn’t exist until you try to save. To work around this you can try this in you custom js:

    function dffs_PreSaveAction(){
        var ticker = 0, interval = setInterval(function(){
            if(ticker > 100){
                jQuery("'This value already exists in the list.')").html("New value...");
                ticker += 1;


You must be logged in to reply to this topic.