Browser goto with dynamic value using submit button for form

Hello,
I know this subject has been covered by many people but I am still having an issue with the browser togo when I am using submit button.
The link works with the static url plus {{id}}. When it comes to submit the form with submit btn - it does not work but the data goes into the database.
I am trying to validate the form on the client side first and then validate the form in the server side before it goes to the database, then send it back to the same page with the details query. Allowing the browser to fresh the page.
Any magic formula for this…?
Thank you in advance.

The Browser GoTo should work on the Form element, i.e. OnSuccess. Have a look at wCart Tutorial part 11. Checkout Functionality, step 79 onwards.

Hi.
You have to change the dynamic events on success like this:

dmx-on:success="browser1.goto('your-file?yourid='+your-dynamic-value)" 

your-dynamic-value has not to be insert in {{ }}

3 Likes

try

dmx-on:success=“browser1.goto(‘your-file?yourid=’+{{your-dynamic-value}})”

Dynamic portion needs to be in curly braces

No Brian - the expression is already dynamic so it doesn’t need any more curly braces.

The solution from Andrea was correct.

Thank you Andrea. It works perfectly. The special element was to add the symbol (+) and not put into the braces.

Thank Ben , Hyperbytes and George for your feedbacks

Guess my brain is not in gear yet, giving an wrong answer to a question i solved over 12 months ago.

Thought holidays were supposed to help you :laughing:

1 Like

This is great!!! but what about if there are 2 or more parameters? Thanks i advance for the help:)

dmx-on:success=“browser1.goto(‘your-file?param1=’+value1+’&param2=’+value2+’&param3=’+value3)”`

1 Like

Thanks @ben, that works perfectly!!!

1 Like