PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How to display percentages?

  1. If I have a form field "enter your current interest rate", how do I get "8.99" to turn into "8.99%"?
    If I'm getting greedy, I'll also ask how to turn "5.78729" to "5.8%" or "5.7873%" (maybe a setting in the form field).
    Thank you.

    Posted 11 years ago on Monday September 3, 2012 | Permalink
  2. You would have to do this on the front end using JavaScript or jQuery. Sounds like you don't want to change the value, in the first case, just the display of it. Here is a jQuery library which claims to do that: http://code.google.com/p/jquery-numberformatter/

    For the second part, the rounding, you would have to do this with jQuery or JavaScript as well. Here is one discussion: http://stackoverflow.com/q/477892

    The front end functionality will not be provided by Gravity Forms. It will have to be handled client side, in the browser, using JavaScript.

    Posted 11 years ago on Monday September 3, 2012 | Permalink