Jump to content

[Share] Click Header button - Show Form popup

Recommended Posts

Description: Click button on Header will open a Form Block in Lightbox.

If you can't make it work, you can send link to your site, I will check it again.

#1. First, you need to edit Site Footer

image.png.27410b0beb2377be8656d846243e9724.png

#2. Add a Form Block

image.thumb.png.5feb16805d61646822e6107ce455e79c.png

#3. Click Design > Enable Lightbox

image.png.aa70695ef2215f94bffe090e75e66d76.png

Click Content > Edit Form Fields

image.png.5fb6b18af23008d0e13b069fe4e3e2ea.png

You can place any fields that you want.

image.png.ee702c228e0da865b72d3702bf02bef8.png

and remember to enter your email in Storage > Notification

image.png.e7dd43f1fadd254b2fd19eafe4901adc.png

#4. Edit Header Button > Enter URL

#contact

Make sure the option “Open link in new tab” is disabled

image.png.d662e289177b01fde13496269146a292.png

#5. Use this code to the Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('header#header [href*="#contact"]').on("click", function(event){
      event.preventDefault();
    $('button.lightbox-handle')[0].click();
  })
})
</script>

image.png.fc3ef82622da8f3318880d5a5542ad46.png

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Replies 0
  • Views 686
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.