Quantcast
Channel: WordPress.org Forums » [WP Feedback & Survey Manager] Support
Viewing all articles
Browse latest Browse all 103

Next & Previous doesnt work

$
0
0

Replies: 0

Hi all, i have some issues with this plugin,

Plugin works ok for the most part, there is 3 tabs on front page (survey,feedback,personal information) which are displayed and working correctly, but previous and next buttons are not switching tabs as they are suppose to.

I tried disabling all the plugins, changing theme and even different wp install but no luck.

I snoop around the plugin files and it seams its the .js issue, to be more exact i think its the form.js file, this is the code:

//assign the navigation and submit button
//alert($('#wp_feedback .navigation .prev_button').length);
var $prev = $('#wp_feedback .wp_feedback_navigation .prev_button').button({
    disabled : true
});

var $next = $('#wp_feedback .wp_feedback_navigation .next_button').button({
    disabled : ($tab_length == 1 ? true : false)
});

var $submit = $('#wp_feedback .wp_feedback_navigation .sub_button').button({
    disabled : ($tab_length == 1 ? false : true)
});

$prev.click(function(e) {
    e.preventDefault();
    $tab_selected = $tabs.tabs('option', 'selected');

    if(0 != $tab_selected && $($('#wp_feedback_tabs li').eq($tab_selected).find('a').attr('href')).validationEngine('validate')) {
        $tabs.tabs('option', 'disabled', []);
        $tabs.tabs('option', 'selected', $tab_selected - 1);
        $next.button('option', 'disabled', false);

        if($tab_selected - 1 == 0) {
            $prev.button('option', 'disabled', true);
        }
        $submit.button('option', 'disabled', true);
        $('html,body').animate({scrollTop:$('#wp_feedback').offset().top}, 200);
    }
});

$next.click(function(e) {
    e.preventDefault();
    $tab_selected = $tabs.tabs('option', 'selected');

    if($tab_length - 1 != $tab_selected && $($('#wp_feedback_tabs li').eq($tab_selected).find('a').attr('href')).validationEngine('validate')) {
        $tabs.tabs('option', 'disabled', []);
        $tabs.tabs('option', 'selected', $tab_selected + 1);
        $prev.button('option', 'disabled', false);

        if($tab_selected + 1 == $tab_length - 1) {
            $next.button('option', 'disabled', true);
            $submit.button('option', 'disabled', false);
        }
        $('html,body').animate({scrollTop:$('#wp_feedback').offset().top}, 200);
    }
});

I could be wrong but since this plugin wasn’t updated for 2 years and is officially compatible with 3.5.2 WP i figured this must be the problem.

https://wordpress.org/plugins/wp-feedback-survey-manager/


Viewing all articles
Browse latest Browse all 103

Latest Images

Trending Articles



Latest Images