Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'd like to open content (text or a simple form) in a lightbox when a user clicks a specific URL. like this

Every plugin I've found so far opens a lightbox when someone comes to the site or goes to a page -- nothing I've found is setup to open the lightbox when the user clicks on a link.

There are some hacks using Fancybox and jquery -- but if one exists I'd much prefer using a plugin, I'm not to comfortable messing with javascript and the theme files.

share|improve this question
add comment

1 Answer 1

Opening a form in a lightbox will take some code.

There is a nice tutorial from Gravity Forms that is pretty basic. http://www.gravityhelp.com/creating-a-modal-form-with-gravity-forms-and-fancybox/

You basically add the javascript to your theme and create a special blank template to open the form in then add a class to the a tag that links to the form.

share|improve this answer
    
Thanks for your reply Chris. That code doesn't look too bad. I'm a little surprised Gravity or Wufoo or someone else hasn't written a plugin to do the whole thing - but there are probably technical nuances I don't grasp that make that difficult. –  Larry Jul 10 '12 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.