Hi,
If I use this colModel code:
…
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
url: 'index.php',<br /> editurl: 'index.php',<br /> datatype: 'json',<br /> mtype: 'GET',<br /> autoencode: true,<br /> colNames: ['#', 'Author', 'Name', 'Home Phone', 'Attention', 'Address', 'Address2', 'City', 'Prov/State', 'Country', 'Postal Code', 'Office Phone', 'Fax', 'Cell', 'EMail', 'Discount', 'Notes'],<br /> colModel:[<br /> {name:'id', index:'id', width:55, sortable:true, formatter:addSpace, unformat:removeSpace, editable:true, editoptions:{readonly:true}, formoptions:{label:"Cust ID", rowpos:1}},<br /> {name:'author', index:'author', width:75, align:'center', editable:true, edittype:'select', editoptions:{value:{Y:'Yes',N:'No'}}, formoptions:{rowpos:2}},<br /> {name:'name', index:'name', width:220, searchoptions: {sopt:['cn']}, formatter:addSpace, unformat:removeSpace, editable:true, editoptions:{size:40, maxlength:40}, formoptions:{label:"Name", rowpos:3}},<br /> {name:'homephone', index:'homephone', width:110, searchoptions: {sopt:['cn']}, formatter:addSpace, unformat:removeSpace, editable:true, formoptions:{rowpos:11}},<br /> {name:'address', index:'address', width:250, searchoptions: {sopt:['cn']}, search:true, hidden:false, formatter:addSpace, unformat:removeSpace, editable:true, editrules:{edithidden:true, required:true}, editoptions:{size:40, maxlength:40}, formoptions:{rowpos:5}},<br /> {name:'address2', index:'address2', width:130, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:40, maxlength:40}, formoptions:{rowpos:6}},<br /> {name:'attention', index:'attention', width:130, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:40, maxlength:40}, formoptions:{rowpos:4}},<br /> {name:'city', index:'city', width:130, formatter:addSpace, unformat:removeSpace, editable:true, searchoptions: {sopt:['cn']}, formoptions:{rowpos:7}},<br /> {name:'prov', index:'prov_state', width:40, editable:true, hidden:true, editrules:{edithidden:true}, formoptions:{rowpos:8, elmsuffix:" <font size='0px'><a href='#' class='ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all' style='padding:0px;' title='Province Lookup' onmouseover='$(this).addClass("ui-state-hover");' onmouseout='$(this).removeClass("ui-state-hover");' onClick='ShowBrowse("state_browse", 200, 1230, 362, 323);' rel="nofollow"><span class='ui-button-icon-primary ui-icon ui-icon-newwin'></span><span class='ui-button-text'>Province Lookup</span></a></font>"}},<br /> {name:'country', index:'country', width:180, editable:true, hidden:true, editrules:{edithidden:true}, formoptions:{rowpos:9, elmsuffix:" <font size='0px'><a href='#' class='ui-button ui-button-icon-only ui-widget ui-state-default ui-corner-all' style='padding:0px;' title='Country Lookup' onmouseover='$(this).addClass("ui-state-hover");' onmouseout='$(this).removeClass("ui-state-hover");' onClick='ShowBrowse("state_browse", 200, 1230, 372, 330);' rel="nofollow"><span class='ui-button-icon-primary ui-icon ui-icon-newwin'></span><span class='ui-button-text'>Country Lookup</span></a></font>"}},<br /> {name:'postal_zip', index:'postal_zip', width:130, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:9, maxlength:10}, formoptions:{rowpos:10}},<br /> {name:'officephone', index:'officephone', width:110, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:20, maxlength:20}, formoptions:{rowpos:12}},<br /> {name:'fax', index:'fax', width:110, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:20, maxlength:20}, formoptions:{rowpos:13}},<br /> {name:'cellphone', index:'cellphone', width:110, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:20, maxlength:20}, formoptions:{rowpos:14}},<br /> {name:'email', index:'email', width:110, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:40, maxlength:40}, formoptions:{rowpos:15}},<br /> {name:'default_discount', index:'default_discount', width:110, hidden:true, editable:true, editrules:{edithidden:true, required:false}, editoptions:{size:3, maxlength:3}, formoptions:{rowpos:16}},<br /> {name:'notes', index:'notes', width:110, hidden:true, editable:true, edittype:"textarea",unformat:returnVal, editrules:{edithidden:true, required:false}, editoptions:{rows:"10", cols:"40"}, formoptions:{rowpos:17}}<br /> <br /> ],<br /> pager: '#customer_livegrid_pager',<br /> postData: {gridname:'customer_livegrid'},<br /> height: 440,<br /> rowNum: 30,<br /> scroll: 1,<br /> altRows: true,<br /> ... |
|
1 |
I expected to see the form with the fields in this order: |
|
1 |
Cust ID, |
|
1 |
Author, |
|
1 |
Name, |
|
1 |
Attention, |
|
1 |
Address, |
|
1 |
Address2, |
|
1 |
City, |
|
1 |
Prov, |
|
1 |
etc.. |
|
1 |
However, the edit form appears with the fields out of the correct sequence....like this: |
|
1 |
<img decoding="async" loading="lazy" src="http://www.digitaldigs.ca/Example.jpg" alt="Edit Form with Fields in wrong order" width="386" height="680" /> |
|
1 |
And if I submit the data, I get this in the _POST vars: |
|
1 |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top