Currency Field on a form | Community
Skip to main content
January 16, 2018
Question

Currency Field on a form

  • January 16, 2018
  • 2 replies
  • 2999 views

I have a series of custom fields that I created and set them to field type currency. I set up an alert email to notify sales of what was filled out in the form however the formatting for the numbers are not coming through. Example: 5000 is not coming through as 5,000. How do you make the number format to currency (add in the comma and decimal). I thought by selecting currency field this would happen.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

keithnyberg
Level 7
January 16, 2018

Hey Amanda,

Based on comments in this similar thread, Annual Revenue Token  I believe the best solution is using a velocity script token as opposed to using the basic field token.

Check out the comment made by @Sanford Whiteman​ at the bottom.

Sincerely,

Keith Nyberg

SanfordWhiteman
Level 10
January 16, 2018

Keith is correct, you must use Velocity. Currency merely means a certain type of Float internally, it doesn't directly have anything to do with how something is printed.

January 17, 2018

Hi Sanford Whiteman​ thanks for writing back! Here is my token that is in my email for the currency field: $ {{lead.$1 Buyout 12 Month Payment:default=}}. In the code I need to update the token with the velocity scripting correct? So the code change would be; from:

THIS       <td valign="top" style="padding: 5px 10px; border-top: solid 1px #d0d0d0; font-size:16px; line-height: 1.75; font-family: Arial, Tahoma, Helvetica, sans-serif;"> $ {{lead.$1 Buyout 12 Month Payment:default=}} </td>:

TO:         <td valign="top" style="padding: 5px 10px; border-top: solid 1px #d0d0d0; font-size:16px; line-height: 1.75; font-family: Arial, Tahoma, Helvetica, sans-serif;"> $ ${esc.d}${number.format(lead.$1 Buyout 12 Month Payment:default=} </td>


?

This is all new to me so any help would be appreciated!

January 17, 2018

Meant to note, in the discussion Keith shared above the velocity code example didnt have 2 brackets like standard tokens do {{}}. Wasnt sure if that was a typo or on purpose?