如何访问fuelux向导表单数据? [英] How to access fuelux wizard form data?

查看:97
本文介绍了如何访问fuelux向导表单数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有表单的fuelux向导.我正在通过finish.fu.wizard事件使用javascript提交表单.还有其他/更好的方式提交表格吗?当我尝试访问控制器中的数据时,我什么也没得到.

查看零件

<div id="wizard1" class="wizard wizard-ux">
    <ul class="steps">
        <li class="active"> Step 1</li>
    </ul>
    <div class="step-content">
        <form action="/controller_function" class="form-horizontal" id="form1">
            <input type="text" id="input1" name="input1">
        </form>
    </div>
</div>

jquery部分:

$('#wizard1').on('finished.fu.wizard', function(e){
    $('#form1').submit();
});

控制器部分:

function controller_function(){
    var_dump($this->input->post);
}

在控制器部分看不到Post变量.(我使用的是codeigniter框架,但我不认为这会造成任何问题).我在这里想念的是什么?真的很感谢您的帮助.

解决方案

finished.fu.wizard上提交表单是可行的.您可以检查此小提琴以进行验证: http://jsfiddle.net/yu4qeqs0/1/

我不得不说问题出在您的控制器代码,框架,环境等...

I am using fuelux wizard with a form. I am submitting the form using javascript through finished.fu.wizard event. Is there any other/better way to submit the form? When I am trying to access the data in controller, I am getting nothing.

View Part

<div id="wizard1" class="wizard wizard-ux">
    <ul class="steps">
        <li class="active"> Step 1</li>
    </ul>
    <div class="step-content">
        <form action="/controller_function" class="form-horizontal" id="form1">
            <input type="text" id="input1" name="input1">
        </form>
    </div>
</div>

jquery part:

$('#wizard1').on('finished.fu.wizard', function(e){
    $('#form1').submit();
});

Controller part:

function controller_function(){
    var_dump($this->input->post);
}

No Post variables are visible in controller part.(I am using codeigniter framework but I dont think that is creating any problem). What is it that I am missing here? Any help is really appreciated.

解决方案

Submitting the form on the finished.fu.wizard works. You can check this fiddle to verify: http://jsfiddle.net/yu4qeqs0/1/

I'd have to say the problem lies with your contoller code, framework, environment, etc...

这篇关于如何访问fuelux向导表单数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆