With project NodeJS
After the success of a submit of a form, I would like to be able to redirect to two different pages depending on the value of a field of the form
It’s possible?
if fieldXXX = “1” browser1.goto('page1')"
… ???
if fieldXXX = “2” browser1.goto('page2')"
Yes. Use a set value to the $POST’d field, makes sure it’s output is checked, then in the onsuccess event of the form, add your check and browser redirect
Thank you
I’m spinning around but I can’t finish
in the page I have a radio field with two alternative choices. The field is saved correctly in the database with the value corresponding to the choice made.
In my case the “circuit” field saves “stripe” or paypal "
If the form submission is successful I can only insert a single “go to” action
I cannot set a condition that allows me to direct to two different pages depending on the choice made
You could use an inline flow on the success event of the form, then in the flow you can have a condition that checks the param where ever it comes from, after that use the run step in each of the then or else sections provided by the condition
OK, i see what you are doing. You need to return the value of ther radio button from server action (use a set value stage) so you condition will something like frm_new_payment.data.nameofsetvalue (you should see it in the picker)
@Iperbyte
i'm trying your suggestion but i can't understand
If I insert the "form success" statements manually in the code they don't work
If, on the other hand, I want to insert the instructions from the Wappler panel, I can't find the value of the radio "circuit".
I want to clarify that the value of the "circuit" field in the newly created record is correct
How can I recover that value?