使用alertify - version 0.3.11
,我能够获取用户输入的详细信息并能够在提示对话框中显示它。但我有多个价值观,即。用户输入、下拉值、日期选择等
var totalResources = jQuery('#grid').jqGrid('getGridParam', 'selarrrow');
//set custom button title for Form Submit
alertify.set({ labels: {
ok : "Submit Data",
cancel : "Cancel"
} });
//fetch user input comment
alertify.prompt("Please enter note/remarks for this Form :<br/>Total Resource(s): <strong>"+totalResources.length+"</strong>", function (e,value) {
if (e) {
alertify.success("Data has been submitted");
//encodes special characters remarks
var sow = encodeURIComponent(value);
$.post(SITE_URL+"somecontroller/someaction",$("#frm_submit").serialize()+ "&resource_ids="+resource_ids+"&sow="+sow, function( data ) {
});
}else{
alertify.error("Your Data is not submitted");
}
});
类似于下图所示
我如何使用 alertify 构建一个模式表单,用户将在其中看到预先设置的详细信息并可以输入他的详细信息并提交?