Get form field value over API [RESOLVED]

how could do it if i need to get field value over API? so i have set some data (dates , etc) and then check availbility and price over API ? then process a payment.

it is like calculated field but with API call. is it possible?

can i write custom php function for calculated field ? that would solve it

Yes, Gravity Forms provide API, and you’ll find details guideline here:

You’ll have to write custom PHP code. You’ll find more details about how to get GF fields here:

Are you wanting to call a 3rd party API to confirm availability and price and then have your Gravity form process the payment?

As Faisal mentioned, you can do that with custom code, probably relying on either gform_after_submission and/or the Webhooks add-on.

If you’d prefer an approach that either involves no code, or a lot less, check out Gravity Flow.

  • The Outgoing Webhook step type has response mapping features built into it - so you can provide the structure API requires and map the values it provides back into your entry.

  • As each step in the workflow would (potentially) occur sequentially, you could then trigger a payment feed such as Stripe to occur immediately after or via a separate Form Submission step. The difference being when the customer provides their CC details or sees the full pricing details.

Or is it that you need a 3rd party system is looking to consume entry data in your forms for it to handle the payment side?
The GFAPI and Rest API links that Faisal provided would be the best place to start.


Outgoing api is what i need. So gravity Flow is like

Similar in concept that it lets you automate tasks. In that way Zapier and others are similar.

Different in execution in that it is all hosted and configured within your WP environment (when you access the Gravity Forms editor you’ll find Gravity Flow under Settings > Workflow). It also has no transaction costs/restrictions on operations. The purchase gets you 1 year of ongoing plugin updates and access to our awesome support team to help you get started or when you run into questions on configuration.

1 Like

Looks good, will try it ouy

confused here, i have gravityflow installed.

so what i need

  1. customer sets date and tour type
  2. button “check availability”
  3. API reads price from external API (i can do it with API step)

but i need to continue form immediately (if tour is available) by other form for payment.
not sure how can i do it.

you mentioned " separate Form Submission step." but where is that?

I put together a quick video recap walking through how the different steps / confirmation redirects and merge tags tie together that makes it appear seamless to customer that multiple steps/forms occur with API data - Screen Capture on 2023-04-17 at 15-07-12.mp4 - Droplr

Some other links that may help you depending on which payment systems you use:

  • Form Submission Steps that use the {workflow_form_submission_url} in the confirmation redirect field. The outgoing webhook API responses would map field values into the original field and then the form submission step settings map those to the payment form.

  • If you are using Stripe for payments, the Gravity Flow Stripe extension has several approaches you can use that may fit more/less depending on your use case. The Payment Form step sounds like it would fit closest for your needs, the rest have more detail covered in our extension docs

If you need additional help, don’t hesitate to reach out to Gravity Flow support.


1 Like

awesome, i was missing form connecrtor extension

1 Like