• Resolved pvtsolver

    (@pvtsolver)


    Hello,

    How to make the accepted range of a field appeared to the user as “0%” and “100%” instead of “0” “100“?

    In other words, how to add the percentage “%” symbol at the end of a “Min” and “Max” attributes?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @pvtsolver

    If you are referring to the error message, the percentage symbol should be entered into the error messages section, and not into the field’s settings. In the field’s settings, you must enter the numbers only.

    The error message would be entered as follows:

    Please enter a value less than or equal to {0}%

    Best regards.

    Thread Starter pvtsolver

    (@pvtsolver)

    Thanks for your quick reply.

    If I enter the percentage symbol into the error messages section, the whole form will be affected.

    I want the error message to appear with percent symbol for specific fields only.

    Is this possible?

    Please advise.

    Plugin Author codepeople

    (@codepeople)

    Hello @pvtsolver

    If you want to customize the error messages for specific fields, you should do it by code.

    I’ll try to describe the process with a hypothetical example. I’ll assume you want to modify the min and max errors associated with the fieldname1 field (Remember, the field’ name and the texts are hypothetical, only to describe the process)

    * Insert an “HTML Content” field in the form with the following piece of code as its content:

    
    <script>
    fbuilderjQuery(document).one('showHideDepEvent', function(){
    jQuery('[id*="fieldname1_"]')
    .attr('data-msg-min', 'Please enter a value less than or equal to {0}%')
    .attr('data-msg-max', 'Please enter a value great than or equal to {0}%');
    });
    </script>
    

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Format “Min” & “Max” Attribute’ is closed to new replies.