Home › Forums › Quform WordPress › Quform popup as a link in the menu › Reply To: Quform popup as a link in the menu
October 7, 2019 at 4:30 pm #30038
thewebmachine
Participant
Hi Ally, I hope you are well and thank you for the support. I tried to use your method but I am getting no results.
I did the following:
My menu id: #mega-menu-item-1482 created as a custom link
My code in a custom plugin
<?php
/*
* Plugin Name: Quform Custom Code
* Description: Custom code for Quform.
* Version: 1.0
*/
add_action(‘wp_footer’, function () {
if (!class_exists(‘Quform’)) {
return;
}
echo do_shortcode(‘[quform_popup id="3"]‘); ?>
<script>
jQuery(function ($) {
$(‘#mega-menu-item-1482’).click(function () { $(‘.quform-popup-link-3’).click(); return false;
});
});
</script>
<?php