Buy Now
Sign in

Sort Code

har7801 , October 11 2012
I have used the tutorial for V4 and got the database working well, the tutorial for multi record loading. Now that I am getting a few records, is that a line I can enter into the custom code section that will sort the results by a field (cf_id) in a descending order.


Hi Mick,

Please check the "Order Fields" field in the "Multi Record loader" action under the "Data displayer" tab.

If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
Thanks Heaps,

Is there anyway to reverse the sort order doing that?
Hi Mick,

I don't think that you can specify ASC or DESC in the DB Multi-Record Loader (I just tried and nothing was ordered). If you aren't using the Data Displayer then you could use a custom Code action to reverse the order of the array. Or you could try adding an extra column to your table and set it to be the negative of the cf_id.

Later: I just looked at the code and there is a workaround.

First you must enable Pagination (I don't quite know why). Then use a Custom Code action before the DB Multi Record Loader and add code like this.
if ( !isset($form->data['order']) || !$form->data['order'] ) {
$form->data['order'] = 'cf_id';
if ( !isset($form->data['direction']) || !$form->data['direction'] ) {
$form->data['direction'] = 'DESC';


Later still: I added this FAQ
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much