Home › Forums › Quform WordPress › How to link the form to a button on webpage
- This topic has 13 replies, 4 voices, and was last updated 11 years, 6 months ago by vegastriguy.
- AuthorPosts
- March 8, 2013 at 6:28 pm #3309timothylarnerParticipant
How would I link the pop-up form to a button, i have tried a few different codes but I cant get it to work.
<a target="_blank" href="” class=”button button_large button_” style=”margin-top: 20px;”>Contact Us
March 8, 2013 at 6:48 pm #3311timothylarnerParticipant<a target="_blank" href="<iphorm_popup id="4" name="contact"></iphorm_popup>" class="button button_large button_" style="margin-top: 20px;">Contact Us <i class="icon-envelope-alt"></i></a>
March 10, 2013 at 8:39 am #3318AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 11, 2013 at 12:31 am #3325timothylarnerParticipantI will try this tomorrow morning thank you
March 19, 2013 at 4:35 pm #3438RiplaParticipantHi,
I can get the above to work no problem, however I have 3 different forms and I just cant seem to get it to work properly
I can get all 3 buttons to look how they should with their own text in them but the all load the same form.
I change the ID and the name to that of the form I want to load but it just loads whichever is in the the first button.
[button link="#form" color="#b00" size="3" style="3" dark="0" square="1" radius="5" ]Get-a-Quote[/button][iphorm_popup id=2][/iphorm_popup]
jQuery(document).ready(function ($) {
$(‘a[href=”#form”]’).click(function () {
$(‘.iphorm-fancybox-link’).click();
return false;
});
});[button link="#form" color="#b00" size="3" style="3" dark="0" square="1" radius="5" ]General Enquiry[/button][iphorm_popup id=1][/iphorm_popup]
jQuery(document).ready(function ($) {
$(‘a[href=”#form”]’).click(function () {
$(‘.iphorm-fancybox-link’).click();
return false;
});
});[button link="#form" color="#b00" size="3" style="3" dark="0" square="1" radius="5" ]Request Callback[/button][iphorm_popup id=3][/iphorm_popup]
jQuery(document).ready(function ($) {
$(‘a[href=”#form”]’).click(function () {
$(‘.iphorm-fancybox-link’).click();
return false;
});
});Any help would be great.
March 21, 2013 at 2:19 pm #3460AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 21, 2013 at 7:40 pm #3503RiplaParticipantgreat thank you
April 18, 2013 at 9:49 pm #3927RiplaParticipantI have just managed to get to this solution but I still dont seem to be able to get it to work
The code I am now using is as follows (notice I have dropped it to 2 forms instead of three)
[button link="#form" color="#ff0000" size="4" style="4" dark="0" radius="5" target="self"]Get a Quote[/button]
[iphorm_popup id=2][/iphorm_popup]jQuery(document).ready(function ($) {
$(‘a[href=”#form”]’).click(function () {
$(‘.iphorm-fancybox-link-2’).click();
return false;
});
});[button link="#form" color="#ff0000" size="4" style="4" dark="0" radius="5" target="self"]Contact Us[/button]
[iphorm_popup id=3][/iphorm_popup]jQuery(document).ready(function ($) {
$(‘a[href=”#form”]’).click(function () {
$(‘.iphorm-fancybox-link-3’).click();
return false;
});
});Any ideas?
Oh, yes I am using version 1.4.2
Many Thanks
April 19, 2013 at 9:14 am #3929AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
May 1, 2013 at 12:44 pm #4209RiplaParticipantExcellent it is now working a treat, many thanks
May 4, 2013 at 4:42 pm #4257vegastriguyParticipantI hope it is ok, to jump on board this thread. I am actually trying to link a pop-up form from a custom graphic I have created and want to put in a sidebar widget. At this point I only have the one form.
Here is the code I came up with but it is not working….
<a target="_blank" href="”> img src=”/wp-content/uploads/2013/05/salesbutton.png” align=”center”>
Can you tell me what I am doing wrong? Thanks in advance.
May 4, 2013 at 6:31 pm #4259RiplaParticipantHi vegas
I would try this solution, change the conact us text for the image.
No expert here but worth a try
Contact Us
[iphorm_popup id=”1″ name=”contact”][/iphorm_popup]jQuery(document).ready(function ($) {
$(‘a[href=”#form”]’).click(function () {
$(‘.iphorm-fancybox-link’).click();
return false;
});
});May 4, 2013 at 6:32 pm #4260RiplaParticipantnope – let me try that again
<a href="#form" class="button button_large button_" style="margin-top: 20px;">Contact Us <i class="icon-envelope-alt"></i></a>
[iphorm_popup id="4" name="contact"][/iphorm_popup]
<script type="text/javascript">
jQuery(document).ready(function ($) {
$('a[href="#form"]').click(function () {
$('.iphorm-fancybox-link').click();
return false;
});
});
</script>
May 4, 2013 at 6:55 pm #4261vegastriguyParticipantThank you Ripla for the efforts….that did not work for me…BUT, I did find my solution finally. I use the Black Studio TinyMCE plugin and when I add that to my sidebar, and work in HTML view, there is the Quform shortcode insert. So, in HTML view, I insert the shortcode and include the prompts for a pop-up. THEN, I insert media which is my .jpg button. I move the closing tag .
So, it ends up looking like this for me.
[iphorm_popup id="1" name="myformname"]<img src="/wp-content/uploads/2013/05/salesbutton2.png" alt="salesbutton2" width="281" height="206" class="alignnone size-full wp-image-62" />[/iphorm_popup]
- AuthorPosts
- You must be logged in to reply to this topic.