-
AuthorPosts
-
April 20, 2015 at 10:53 am #254049
Is it possible to create a modal pop-up with a contact form 7 form inside? I saw somewhere in a forum post that this can be created with a lightbox, but I can not find the post.
Thanks in advance!
April 20, 2015 at 12:18 pm #254112Hi There,
Thanks for writing in.
You can try adding this following code to the page / post content, don’t forget to switch your Content Editor to Text Mode:<div id="my-content"> [contact-form-7 id="54" title="Contact Modal"] </div> <a href="#my-content" class="lightbox-selector x-btn" data-type="inline">Click Me</a> [lightbox selector=".lightbox-selector"]
Hope it helps.
August 12, 2015 at 11:03 am #357220Hi,
I managed to get it all setup. But I have some extra gap on my form’s top and bottom. Please refer to screenshot : http://tinypic.com/r/35k205i/8
How do I get rid of those gaps/white spaces?
Thanks in advance! 🙂
August 12, 2015 at 11:03 am #357221Hi,
I managed to get it all setup. But I have some extra gap on my form’s top and bottom. Please refer to screenshot : http://tinypic.com/r/35k205i/8
http://axiomlearning.sg/primary-school/
How do I get rid of those gaps/white spaces?
And lastly, the q from (required) and g from (Message) is slightly cut off, what’s the best way to align them properly?
Thanks in advance! 🙂
August 12, 2015 at 12:45 pm #357313Hello There,
Thanks for writing in!
Kindly use following CSS under Custom > CSS in the Customizer:
form.wpcf7-form { margin-bottom: 0 !important; } form.wpcf7-form h4 { margin-top: 0.50em !important; } .ilightbox-container { height: auto !important; }
Let us know how it goes.
Thanks.
August 12, 2015 at 8:43 pm #357669Wow, thanks for the quick update. The white spaces on top and bottom have been removed. 🙂
Just need the alignment of the input fields or the field titles to be adjusted so that the “g” and “q” aren’t cut off.
http://tinypic.com/r/npgpcg/8Thanks again! 🙂
August 12, 2015 at 10:44 pm #357772Hi there,
Thanks for updating the thread! You can add this under Custom > CSS in the Customizer or in your child theme’s style.css file.
form.wpcf7-form p { line-height: 1.8; }
Hope this helps – thanks!
August 13, 2015 at 3:49 am #358078Yeah. It’s all great now! 🙂
August 13, 2015 at 4:19 am #358099Good to know.
Have a great day! 🙂
December 28, 2015 at 1:22 pm #723376How would I put this code :
<div id="my-content"> [contact-form-7 id="54" title="Contact Modal"] </div> <a href="#my-content" class="lightbox-selector x-btn" data-type="inline">Click Me</a> [lightbox selector=".lightbox-selector"]
Into my theme with cornerstone?
December 28, 2015 at 4:17 pm #723589Hello There,
Using Cornerstone, please add a RAW CONTENT element and then enter above code.
Hope this helps.
March 14, 2016 at 9:28 am #837057Hello
Is it possible, to link a ligthbox not to a button but to an usual link? I imagine a normal textblock and in this text, i link a word to a lightbox containing a form.
March 14, 2016 at 10:25 am #837131Hi There,
Please update the previous code a bit:
<div id="my-content"> [contact-form-7 id="177" title="Contact form 1"] </div> Hello, click <a href="#my-content" class="lightbox-selector">me</a> to show the lightbox! [lightbox selector=".lightbox-selector"]
Hope it helps 🙂
April 7, 2016 at 1:26 pm #871610Hello,
I added the code from above:
<div id=”my-content”>
[contact-form-7 id=”54″ title=”Contact Modal”]
</div>[lightbox selector=”.lightbox-selector”]
But it showed up with the contact form showing, with a button underneath. The button works to open up the lightbox, but I would like the form hidden until you click the button.
Here is a screenshot of my form.April 8, 2016 at 1:15 am #872381Hi There,
Please try updating the code to this:
<div id="my-content" style="display:none;"> [contact-form-7 id="54" title="Contact Modal"] </div>
Hope this helps.
-
AuthorPosts