Skip to content
Grav 2.1 is out: every page speaks Markdown. 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 · 801 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 FrViPofm, 4 days ago
5 85 4 days ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2113 7 months ago
Forms & Blueprints · by Hugo Oliveira, 8 months ago
0 597 8 months ago
Forms & Blueprints · by Flachy Joe, 9 months ago
9 690 9 months ago
Forms & Blueprints · by Augustus, 10 months ago
7 737 10 months ago