Skip to content
Grav 2.0 is officially stable. Read the announcement →
Forms & Blueprints

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

form

Solved by pamtbaau View solution

Started by Christian Puschendorf 3 years ago · 1 replies · 691 views
3 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.

3 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 Ton Haarmans, 5 years ago
13 1539 5 months ago
Forms & Blueprints · by Hugo Oliveira, 6 months ago
0 263 6 months ago
Forms & Blueprints · by Flachy Joe, 8 months ago
9 369 7 months ago
Forms & Blueprints · by Augustus, 8 months ago
7 365 8 months ago
Forms & Blueprints · by Julien, 8 months ago
10 397 8 months ago