Pre-Filling a Form with $_POST data

By: Rene Kiesler | Asked: 02/09/2023
ForumsCategory: General questionsPre-Filling a Form with $_POST data
Rene Kiesler asked 1 year ago
Hi! We have noticed, that it is possible to pre-fill a form with data submitted with url-parameters ($_GET parameters). Unfortunatelly, this e.g. means, submitting an email from one site to the other with a URL in our case, which of course is not very elegant. Would it also be possible to pre-filled a form with $_POST parameters? How would that work? Thank you!
1 Answers
Victor Font answered 1 year ago
If you need to share Formidable entry data across sites, use the API add-on on both sites. It's a REST interface between the two sites. See these details about the API add-on: https://formidableforms.com/knowledgebase/formidable-api/
Rene Kiesler replied 1 year ago

Thanks! We have a custom website (not running WordPress / FF) on the one side, would like to implement a post form there, that targets a WordPress / FF site. Could we just call that API from the non-wordpress / FF site? Or does that API require wordpress / FF on both ends?

Victor Font replied 1 year ago

No, the API does not require WordPress/FF on both ends. A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. REST stands for representational state transfer and was created by computer scientist Roy Fielding. The WordPress/FF API is a RESTful web service, which is a web data exchange standard that uses JSON as the REQUEST/RESPONSE.

REST API REQUESTS require an authentication method. When you install the Formidable API add-on, an API key is created for your site. The key is your authentication string that you pass from the requesting system to allow access to the receiving system.

You don't mention the platform you're using for your non-WordPress system. If your platform's foundational language can send REST API REQUESTS, Formidable can receive it and process it. Likewise, Formidable can send REST requests to non-WordPress REST endpoints to pull information into Formidable. An endpoint is a URL that triggers some functionality on your server. REST is a 2-way transfer process. If you can construct a REST payload with a JSON REQUEST header, Formidable will process it and add an entry to the database.

Let us know how you make out with this. It sounds like an interesting project. Good luck.

Victor Font replied 1 year ago

API projects require advanced development and diagnostic skills that not all WordPress developers possess. If you run into issues developing your code, you may be able to find assistance in the Formidable Masterminds Developers Directory at https://formidable-masterminds.com/developers-directory/. If you've been part of this community for more than a day, you find a lot of familiar names in the directory.

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