- hgc2002Asked on October 02, 2012 at 10:29 AM
I'm using lightbox form. The given example works using a anchor like
But know i need to open it when another buttons get into action. I don't see any method to open the form without click in the anchor. I've tried with jQuery triggering click event in the anchor but it fails.
How can I open the form without using the anchor?
Thanks for your time.
- JotForm SupportRodjitAnswered on October 02, 2012 at 11:41 AM
You may try placing this codes into your website:
<?php } ? >
Please note to change the URL of the form in script.
Hope this helps. Thanks
- JotForm SupportabajanAnswered on October 02, 2012 at 12:22 PM
Notwithstanding that you asked for a solution that doesn't use the anchor, as an alternative, according to Dan Shulz (deceased) in this thread, you could enclose a span within the anchor tags and style it via CSS to look like a button. (Here are some CSS3 examples but your buttons need not be that fancy!)
It's also possible to have the lightbox automatically open when the page loads (as demonstrated at this link) by adding an openOnLoad: true parameter to the lightbox code. In such cases, the anchor link can be omitted.
The solution offered in this thread may also be useful.
Later today, I'll test out Dan's solution later and post a demo here.