Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

How to collect data via a form and send it to a REST API?

form

Solved by pamtbaau View solution

Started by Christian Puschendorf 4 years ago · 1 replies · 876 views
4 years ago

How can I collect data via a form and send it to a REST-API? I would like to capture certain information and save it in a database programme with REST-API (Ninox), as the data will be further processed there.
At the moment I have solved the problem via an intermediate SQLITE DB, but then I always have to actively trigger the retrieval of the record.

4 years ago Solution

@chalvi, You could create a custom form action, which can be caught at the server when the form is being submitted. Then get the values of the form and submit it to the remote server.

See the docs and example in section Custom Actions of the Forms documentation.

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Japhy, 2 weeks ago
2 261 4 days ago
Forms & Blueprints · by FrViPofm, 4 weeks ago
5 326 4 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2317 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 779 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 868 10 months ago