What the vistor sees vs what is sent over [RESOLVED]

I am working on a Gravity form and it seems to work great except what the customer sees is this:

$100,000
$200,000
$300,000
$400,000
$500,000
$1,000,000

However, what the API Documentation expects is one of these values:

  • 100000
  • 200000
  • 300000
  • 400000
  • 500000
  • 1000000

Of course I would want to include the $ sign to make it more readable for the visitor but if I do that it sends over the $ as the value and it fails on the PUT message because of it. I tried to do the “input mask” and it didn’t do any good. I also tried to load them dynamically and that didn’t do anything to change that. I am assuming this would require some hard coding. I am used to JS where you have a value that is sent over and also a “text” that the visitor sees. Does Gravity Forms have documentation on how to do this similarly?

Thank you for your input.

Hi Jerry. There is no documentation that supports your custom method to send the data over via JavaScript. You will need to modify the values before using then with your API call.

How would you modify the values?

That would be up to you in your JavaScript. I have not seen your code so I can’t guess where it will be, but you will do some string manipulation in order to send the value you want, vs the default of what the user sees.

Thanks for your response Chris. I was able to figure it out. Gravity Forms does have an area where you can do exactly this with the dropdowns. So you can have it to where the user will see $100,000 but the value will be 100000 so it complies with the API. Once again thanks for your prompt responses and I hope you had a Happy Thanksgiving.

Very good. Thank you for the update Jerry. If you need anything else, please feel free to open a new topic.

Cheers!

© 2008 - 2021. Gravity Forms is a project by Rocketgenius Inc.