Home › Forums › Quform WordPress › Problem with popup and button connected to checkboxes
- This topic has 1 reply, 2 voices, and was last updated 8 years, 9 months ago by
Ally.
- AuthorPosts
- December 14, 2016 at 7:38 am #20508
ahoniemi
ParticipantHi, i’m creating a job application form on my website using Quform.
I have a button which says “Apply / Read More” and this button should trigger a popup with the form inside, and the checkboxes connected to that job should be automaticly checked. But this doesent work, the button does trigger something though, a gray layer appears over my website but no form is visible.
I contacted themecatcher support and i followed these instructions:
Hi
It is possible but it will require a bit of JavaScript coding to hook it all up. So have the popup form somewhere on the page just once, with no trigger text so that it's invisible e.g.
[iphorm_popup id="1" name="Job application"][/iphorm_popup]
Then add this script to the page (see here for help):
<script>
jQuery(document).ready(function ($) {
$('.job-apply').click(function () {
var job = $(this).data('job');$('.iphorm_1_1').each(function () {
if ($(this).val() == job) {
$(this).prop('checked', true);
} else {
$(this).prop('checked', false);
}
});$.uniform.update();
$('.iphorm-fancybox-link-1').click();return false;
});
});
</script>Replace iphorm_1_1 with the unique ID of the Checkboxes field. And replace the number 1 in iphorm-fancybox-link-1 with the form ID. Then you can have buttons containing the exact names of the jobs in the data-job attribute:
I get an error in my console (only when the grey layer appers after pressing the button:
jquery.fancybox-1.3.4.pack.js?ver=1.3.4:23 Uncaught TypeError: d.get(...).style.removeAttribute is not a function(…)K @ jquery.fancybox-1.3.4.pack.js?ver=1.3.4:23d.complete @ jquery.min.js:3j @ jquery.min.js:2fireWith @ jquery.min.js:2i @ jquery.min.js:3n.fx.tick @ jquery.min.js:3
Any thoughts on what could be wrong?
Thanks!- This topic was modified 8 years, 9 months ago by
ahoniemi.
December 16, 2016 at 12:18 pm #20535Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This topic was modified 8 years, 9 months ago by
- AuthorPosts
- You must be logged in to reply to this topic.