Badges
Accepted Solutions
Likes Received
Posts
Discussions
Ideas
Blog Posts
Agreed, I'm planning on going back and renaming some of the variables since I realized I may need one more since the second form will ultimately lead to a completely different Thank You page once it's made. Thanks for your help!
Ok, I think I got it! It seems to be working correctly, but let me know if you see any glaring errors: form.onSuccess( (values, followUpUrl) => { if ( criteriaMet === true ) { // RESET SUBMIT BUTTON ...
@SanfordWhiteman I tried adding 'form.submittable(true);' to the onSuccess event, but the button still says Please Wait, so I'm guessing that's not the correct way to reenable the button. I don't see anything for it in the API documentation though. Am I missing something?
Ah ok, that's interesting and definitely easier than bringing a second form into the mix. Do you have an example of what the onSuccess code would look like to reenable the Submit button? I did a quick search but I didn't see anything in here.
Somebody else who worked at the company before me had written the initial code, so I'm just going in now to try to modify it for the new needs. I had edited some parts out when I posted so it wouldn't get too confusing and only show the relevant part of the code I was working with, but here it is in...
I'm trying to create a form where if the user selects a certain value from a dropdown field, their information will be sent when they click Submit, but then a second form with appear with additional optional questions. If they select anything else, they'll just get redirected to a Thank You page. No...
Thank you! One last question as I'm getting to the next phase of the code (I can start a new thread if needed):I'm trying to use the code found here to load the next form: https://nation.marketo.com/t5/product-discussions/on-form-submit-can-i-send-the-user-to-another-form/m-p/296722#M167226 How do I...
What would be the correct implementation then? Not sure if I'm thinking about this wrong, but would I put in a conditional statement in the GTM code? Something like form.onSuccess(function handleSuccess (values, followUpUrl) { window.dataLayer.push({ "event": "...
Actually, I may have figured it out. We use 1 of 2 JS files for all the forms on the site, so on the other JS file, I added an onSuccess script the same way I'm doing in the first one, just without the selection logic. Having it defined there is allowing me to remove the event callback in GTM then a...
How do I exclude them from the GTM callback? Is that a line of code that needs to be added in there? Or an exception that needs to be added to the entire trigger event in GTM?