How to add a simple form to submit data to an HTTP API endpoint?

I would like to do a simple form to submit data to HTTP API endpoint and then direct back to another page once this API has processed the data.
I can initially process the form submission as per but not sure how to direct back to another page.
Any ideas how I can do this in Studio?

Hi @middle_tiger! That guide is for HTML forms. When a form like that is submitted, the browser redirects you to the URL you set in “action”. So you can just make your server redirect to where you want.

If you want to have a JS form instead, that posts something to an API endpoint while keeping in you in the page, allowing you to show something or redirect the user in the browser, at the moment you would need to use app hosting / custom code components. That’s something we’re currently working in improving (to allow you to do that on studio, without writing code).

@tiago so assume 2nd option is not available through studio at the moment but I can still do the first option is that right ? so I need to make the URL I submitted from the “action” to redirect back to my page on site or did I misunderstand?

Yes, that’s it.

@tiago Thanks, I will have a go