My Account

Forums

Forums General Bootstrap5 & JS

Viewing 1 reply thread
  • Author
    Posts
    • #63734
      Marco Bitschnau
      Participant

      Hi guys,

      I have a few questions about how to implement some cool stuff, like:

      1. how would you initialize a BS5 toast with JS on successful form completion?

      2. what would be the easiest way to transfer form data to another form on successful form submission? (I guess JS?) (Or by hiding fields?).

      *I have two different forms on the same page the original idea was a “request a quote” form with basic fields like name, email, message and so on and in the second form there were the same fields with many more conditional fields and so on, when a user fills out the first form and presses the submit button I would like to open the second form with all the previous field already filled out (the second form is hidden in a bootstrap modal).

      **I also want two submit buttons, one named “Submit” and the other named “Continue in service form”. (This example would be with two completely different forms)

      Thanks to everyone who helps me figure out how to complete these tasks.

    • #64841
      John Petroviak
      Keymaster

      Hello Marco,

      You can setup a ‘Run JavaScript’ action on WS Form that runs when a form is submitted. There you could append the proper BS5 Toast HTML and initialize the toast and show it:

      Run JavaScript


      https://getbootstrap.com/docs/5.0/components/toasts/#usage

      One option to populate a second form would be to run a ‘Redirect’ action with query strings in the URL and then populate the new form with the query string:

      Redirect

      Populate a Field With Query String Data

      I hope this helps.

      John

Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Login