The merge tag for the total pricing field displays the total amount including the currency. Is there a way to get the amount only? I need it to create a payment URL in the email notification to the user.
The merge tag for the total pricing field displays the total amount including the currency. Is there a way to get the amount only? I need it to create a payment URL in the email notification to the user.
Hi Ted,
Because the pricing fields automatically add on the currency indicator, you can use the "gform_pre_submission_filter" hook to get around this. You can add a hidden text field to your form and then update that field to the contents of the total field. For your notification merge tags, you will use the hidden field instead of the total field. Because the text field is not considered to be a pricing field, the data will not be converted to currency. Keep in mind that leading/trailing zeroes may not be in the string. Below is a link to sample code I used to accomplish this:
Take a look and let me know if you have questions.
Works great, thanks for the solution!
Thank you for the update. Happy New Year.