How to populate fields based on API data returned

By: Lawrence Smit | Asked: 03/24/2023
ForumsCategory: How-toHow to populate fields based on API data returned
Lawrence Smit asked 1 year ago

Hello.

I've built a form calculator, configured a Send API data action and can get the required information back as can be seen in the attached log.

What I need help with is updating the 9 fields on the form under API FEEDBACK based on what the API is returning.

I'm open to using any solution including 3rd party tools like Uncanny Automator if this helps.

I've attached screenshots which should help clarify what I've done and what is required I'd really appreciate any help.

WP Version: V6.1.1
Formidable Pro V6.1
Formidable API V1.13

I'm happy to discuss and pay for any custom development work required.

Kind regards
Lawrence

Attachments
Question Tags:
Walter JonesWalter Jones replied 1 year ago

Not sure if you left it out for a reason but your API settings screen is missing your API Key, if you havnt left it out on purpose then you need to add it.

Walter JonesWalter Jones replied 1 year ago

What is your notification URL pointing to? How is it specifically targeting the entry from a form to update those key/values pairs you have set?

Lawrence Smit replied 1 year ago

Hello Walter.

Thank you for your messages.

Please let me know if I am not understanding your messages.

I left the Basic Auth field blank under Settings as the notification URL points to a 3rd party that doesn't require authentication.

The fields that are passed to the 3rd party platform are mapped accordingly under MAP DATA. When I submit the form data the correct information is returned as per what can be seen in the log.

At this stage, I am just using an API POST (assuming POST is the correct method to use) to send information to the 3rd party and then get the correct response. I don't know what to add or do to "process" the return data and populate that into the store fields.

Formidable responded via an email I sent to Support saying that this would require custom development work.

Seems like my initial thought that it would be easy to capture/process information received back from an API call was wrong. One would think this is a very common requirement.

1 Answers
Walter JonesWalter Jones answered 1 year ago
The API action from formidable is sending data to your third party correctly right?  The issue your having is with the third party populating that data somewhere?  Are you trying to pass the data back to a form in formidable from the third party?  What’s the third party? I have only ever used the FF API to send data between forms or make modifications to forms in and out of the same WP installation.  


Lawrence Smit replied 1 year ago

The 3rd party financial system is processing and returning the data correctly via my API call. I want to pass the data that I get back into the same form so that the fields under the section API FEEDBACK are auto-populated. I need to have a record of what data was input and what the calculations were per user entry.

Workflow
1. User inputs 4 fields and clicks submit (This is working).
2. Formidable Action sends data via API to 3rd party for calculations to happen (This is working).
3. 3rd party responds with calculated values answers (This is working).
4. The 9 fields under the API FEEDBACK section are auto-populated in the same form based on points 1 to 3.
5. The user needs to easily input different values and see the results on the screen.
5. When the user is happy with the numbers they should be able to email/PDF all the results (I'll use E2Pdf for this).
6. The client will get a report of all the submissions with input and answer data via a view.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right