Pop up Lightbox from inside form | Community
Skip to main content
Jo_Pitts1
Community Advisor
Community Advisor
March 13, 2018
Solved

Pop up Lightbox from inside form

  • March 13, 2018
  • 1 reply
  • 3599 views

Hi there all.

I have a form where the user has to tick a checkbox to acknowledge that they've agreed to the T&Cs.

What I'd love to do is have a 'I agree to the terms and conditions' and have a lightbox with the T&Cs pop up when they click on the 'link'.

Any thoughts on how best to achieve this?  I'm guessing @Sanford Whiteman​ will have an epic answer in about 5 minutes

If it makes any difference, the form will be living on a Marketo LP.

Cheers

Jo

Best answer by SanfordWhiteman

Indeed there are zillions of ways to implement a modal/popup/lightbox (even multiple words for the same thing!).

You can get started with this CSS-only version: MktoForms2 :: Popup EULA

The popup's underlying content is all in one Rich Text field on the form:

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
March 13, 2018

Indeed there are zillions of ways to implement a modal/popup/lightbox (even multiple words for the same thing!).

You can get started with this CSS-only version: MktoForms2 :: Popup EULA

The popup's underlying content is all in one Rich Text field on the form:

Jo_Pitts1
Community Advisor
Jo_Pitts1Community AdvisorAuthor
Community Advisor
September 4, 2019

@Sanford Whiteman‌, I've had this working for quite some time. 

However, now the client's T&Cs have changed, and there is both a link and an email embedded in them.  

This causes a problem as clicking anywhere in the popup closes it.

Thoughts?

SanfordWhiteman
Level 10
September 5, 2019

You need to switch to a JS-driven solution then, there's only so far CSS will take you (tho' maybe could be done with pointer-events: none, it's a lot easier with JS once you're going there).