Forums

Login via REST before showing form

huubs 14 Jul, 2021
Hello, I'd like to add a login functionality before my form display. This login goes via an external REST api, I send the login details, and the REST api sends me a number back that I have to add to the form if the login is succesful. But I am not sure how to proceed.

I think I need to use Javascript to send the details to the REST api, and then display the form. But the thing is, I don't want the form to be displayed at all before the login (so that spammers or anyone can't fill in the form) anyone has an idea how to do this the best way?
huubs 14 Jul, 2021
Okay so I have added an event switcher that runs the REST code and succesfully displays the form if the username and passwords are correct. But now I need to show a username and password box to let the user fill in these values. Do I need to make another form for this (2 forms? )
GreyHead 16 Jul, 2021
Hi huubs,

You can use a multi-page form where the first page shows just the Login inputs, when that submits you can switch either to the full form or back to the Login.

Bob
You need to login to be able to post a reply.