Forums

How to launch a chronoform in a lightbox- from a button?

morse 02 Jun, 2013
Hello,

I can see how to launch a chronoform in a lightbox from a link, but how can one launch a chronoform in a lightbox from a button?

any help appreciated,
GreyHead 03 Jun, 2013
Hi morse,

Add a button and wrap a link around it?

Bob
morse 03 Jun, 2013
Hi Greyhead,

As per your tutorials, I am using a Module to call a secondary form (& to style the link) that calls & displays the desired form in a lightbox. That works fine in lanuching the form from an article link, by calling it this way:
<p>{loadposition myModulePosition}</p>

But I haven't figured out how to modify my button code (or the module code) to call the same form, for example here is my existing button code:
<a href="#" class="art-button">Display the form</a>

Any help would be appreciated.
GreyHead 04 Jun, 2013
Hi morse,

Please try replacing the # with the form URL.

Bob
morse 04 Jun, 2013
Hi GreyHead,

I can call the form if I assign the form to a menu then use that URL to display it, like this:

<a target="_blank" class="art-button" href="contact-form">click here</a>

But it opens in a new window, and doesn't display modally in a lightbox. That was why I was using a chronoforms module to launch a secondary form to (modally) display the primary form with a lightbox (as per http://greyhead.net/chronoforms/show-a-form-in-a-light-box) from a link instead of a button. But what syntax can I use to call the form modally from a button instead of a link?
morse 04 Jun, 2013
Now found an answer - I wasnt aware I could use 2 classes on the same element, so now in the module I modified the class to:

class="modal art-button"

works fine, thanks for your previous help Bob
This topic is locked and no more replies can be posted.