A general question regarding the pro-form steps:
How can I integrate custom checks (PHP functions) or actions?
Let’s assume I want to create a login form that includes an OTP part.
multi-step-form
- step 1a: enter username + password + mobile phone nr in the form fields (step 1)
- step 1b: On click on the NEXT button, a REST API call shall be triggered
(this will e.g. send an SMS and store the OTP on the server, using transients) - step 1c: ONLY if the restAPI call returns an OK the step - next-btn function shall go on and opens the second step (otherwise an error message shall appear).
- step 2a: user will enter the received OTP in the next step
- step 2b: on click of send btn the now entered SMS will be checked via an restAPI function
- step 2c: ONLY if the restAPI call returns OK, the form shall be sent to the server (otherwise error message)
This is only one example. Conditions (Bricksbuilder or Bricksforge) seem not to be the right way. What’s the best recommendation?