使用 jQuery.wizard 时有更多提交按钮并且无法提交表单

问题描述

我正在使用 https://github.com/kflorence/jquery-wizard/ 并具有如下所示的结构。 在分支的每一步中,我都有一个提交按钮:

<button type="submit" name="process" class="btn-form-func submit">
<span class="btn-form-func-content">Submit</span>
<span class="icon"><i class="fa fa-check" aria-hidden="true"></i></span>
</button>

但是提交按钮什么都不做。他们不发布表单数据。

与向导相关的 JS 部分如下所示:

$('#sidebar').wizard({
        stepsWrapper: '#orderContainer',enableSubmit: true,submit: '.submit',transitions: {
            transfer: function (step,action) {
                var branch = step.find("[name=transfer]:checked").val();

                if ($('.total').val() == '$ 0.00') {
                    validatetotal();
                    return false; // prevent moving forward
                }
                return branch;

            },payment: function (step,action) {
                var branch = step.find("[name=payment]:checked").val();

                if ($('.total').val() == '$ 0.00') {
                    validatetotal();
                    return false; // prevent moving forward
                }
                return branch;
            }
        },// Reset validation and remove error notifications from the form
        beforeBackward: function (event,state) {
            $('#orderForm').parsley().reset();
            $('ul.parsley-errors-list').not(':has(li)').remove();
        }
    });

                                                    

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)