dou12352 2018-07-10 10:32
浏览 48

在jquery智能向导上添加一个函数

I want to input data from multiselect (right side) to database, I use the default form smart wizard from gentelella template, to get data from multiselect I make function:

function selectAll(theSel) {
var selLength = theSel.length;
for(i=selLength-1; i>=0; i--) {
    theSel.options[i].selected = true;
}

}

how to solve it so that the data into the database

I added this :

<form class="form-horizontal form-label-left" action="<?=site_url('index.php/biodata/commit'); ?>" method="POST" onsubmit="selectAll(document.getElementById('region_id_assign')); selectAll(document.getElementById('region_out_id_assign')); return;">

and change the code onfinish to true :

$.fn.smartWizard.defaults = {
selected: 0,  // Selected Step, 0 = first step
keyNavigation: true, // Enable/Disable key navigation(left and right keys are used if enabled)
enableAllSteps: false,
transitionEffect: 'fade', // Effect on navigation, none/fade/slide/slideleft
contentURL:null, // content url, Enables Ajax content loading
contentCache:true, // cache step contents, if false content is fetched always from ajax url
cycleSteps: false, // cycle step navigation
enableFinishButton: false, // make finish button enabled always
hideButtonsOnDisabled: false, // when the previous/next/finish buttons are disabled, hide them instead?
errorSteps:[],    // Array Steps with errors
labelNext:'Next',
labelPrevious:'Previous',
labelFinish:'Finish',
noForwardJumping: false,
onLeaveStep: null, // triggers when leaving a step
onShowStep: null,  // triggers when showing a step
onFinish: true  // triggers when Finish button is clicked

};

how to solve it so that the data into the database?

sorry, I'm new this time try using smart wizard

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
    • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
    • ¥15 linux驱动,linux应用,多线程