SOLVED

Re: How to use same form on page twice: in lightbox and embed?

Go to solution
Robert_Ozeroff
Level 1

How to use same form on page twice: in lightbox and embed?

Hello,

I'm having trouble embedding the same form twice on a page. I'd like to have a lightbox open on a button click near the top of the page and the form embedded on the bottom.

I am close to making it work but the bottom form appears twice. Any ideas? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to use same form on page twice: in lightbox and embed?

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: How to use same form on page twice: in lightbox and embed?

Please provide a URL with your actual form so we don't have to use our own forms in a demo.

Robert_Ozeroff
Level 1

Re: How to use same form on page twice: in lightbox and embed?

Thank you for replying Sanford. Here's the basic version of the code:

https://codepen.io/robertlo/pen/ZNZGGg

SanfordWhiteman
Level 10 - Community Moderator

Re: How to use same form on page twice: in lightbox and embed?

Robert_Ozeroff
Level 1

Re: How to use same form on page twice: in lightbox and embed?

Thank you so much, Sanford! Really appreciate that you did this .

mikestlouis
Level 2

Re: How to use same form on page twice: in lightbox and embed?

@SanfordWhiteman - any way to make that codepen work so when the embedded (not in lightbox) form is submitted it carries through with the follow-up process? In both your codepen example and what I am testing, the lightbox form submits and goes to the follow-up page, however, the embedded visual form submits, but button just stays on "Please Wait" and does not proceed.

Getting console errors, which I have checked on my end and there are no conflicting scripts, and doubt codepen would have competing calls?
Screenshot 2023-10-04 at 3.56.21 PM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: How to use same form on page twice: in lightbox and embed?

Wow, that’s really old code that needs to be refactored. I fixed the bug you’re referring to, not sure if that had to do w/changes to the forms library in the interim. Check the CodePen again.