Amit Shah,
Yes, See below where I show BOTH field_type settings that I have tried.
The "first try" example with the NUMERIC indexes is more like the GC example so I did that first, but the "second try" example is what I actually want so that the ALPHABETIC indexes get stored into my PurCheckFmt Field.
BOTH ways work fine as to allowing users to choose the values into a 'text' field type.
BUT THE PROBLEM IS that no matter what ORDER one chooses the multi-select values into the PurCheckFmt Field, they don't get saved into the DB Record in the order that I choose them. They visually appear in the correct order (the chosen order) at Form Edit but once I Save the Records, they are re-orderd into Low-High order into the Record.
I NEED them to stay in the order that I select them, that is the whole idea of letting the user choose the fields, to indicate to me the Order of things on the "Check", I use this information ("8/8Volume, NetValue, etc.) later in another Controller to Layout my GC Edit Form for another Table.
So, The ISSUE is only with the ORDER of how items are saved: how do I stop them from being re-ordered when saved into my table field?
I had a fieldCallback on another field on this form and did a quick Dump/Error_Log from the $post_array("PurCheckFmt") field but the choices had already been re-sorted by then, I guess its being done in the GC JavaScript somewhere?
I also tried the "set" Field_Type but it doesn't work either...
Any ideas appreciated:
$crud->change_field_type('PurCheckFmt', 'text'); #Text Field
SECOND Try:
$crud->field_type('PurCheckFmt','multiselect', array(
"8/8Volume" => "8/8Volume", "NetVolume" => "NetVolume",
"8/8Value" => "8/8Value", "NetValue" => "NetValue",
"8/8Marketing" => "8/8Marketing", "NetMarketing" => "NetMarketing",
"8/8Gathering" => "8/8Gathering", "NetGathering" => "NetGathering",
"8/8Transport" => "8/8Transport", "NetTransport" => "NetTransport",
"8/8SeverTax" => "8/8SeverTax", "NetSeverTax" => "NetSeverTax",
"8/8Amount" => "8/8Amount", "NetAmount" => "NetAmount",
"JIBNetted" => "JIBNetted",
"Legal" => "Legal",
"Interest" => "Interest",
"StateWH" => "StateWH",
"FedWH" => "FedWH",
"AlienWH" => "AlienWH"
));
FIRST Try:
$crud->field_type('PurCheckFmt','multiselect', array(
"1" => "8/8Volume", "2" => "NetVolume",
"3" => "8/8Value", "4" => "NetValue",
"5" => "8/8Marketing", "6" => "NetMarketing",
"7" => "8/8Gathering", "8" => "NetGathering",
"9" => "8/8Transport", "10" => "NetTransport",
"11" => "8/8SeverTax", "12" => "NetSeverTax",
"13" => "8/8Amount", "14" => "NetAmount",
"15" => "JIBNetted",
"16" => "Legal",
"17" => "Interest",
"18" => "StateWH",
"19" => "FedWH",
"20" => "AlienWH"
));