Page 1 of 1

[Solved]FormBrowser - How to sort fields.

Posted: Tue Jan 18, 2011 6:14 am
by tilde
On my page i have this tag: {cms_module module='FormBrowser' browser='medlemmer'}
The page is shown correct.

Now I want to sort the output and change the tag to: {cms_module module='FormBrowser' browser='medlemmer' sort_field='Medlemsnummer' sort_dir='a'}
Now when I see the page it is blank.

How to solve this.

Søren

Re: FormBrowser - How to sort fields.

Posted: Sun Jan 23, 2011 8:16 am
by tilde
I still need a solution for this.

Søren

Re: FormBrowser - How to sort fields.

Posted: Thu Feb 17, 2011 11:27 pm
by ChrisF
I don't think the sorting works as intended in the module. I believe it has something to do with the way the field name variable is captured, but I haven't looked into the code. Anyway, here's how I got around it.

You need the smarty tag: {FormBrowser browser='my-form' fbrp_sort_field=' ' fbrp_sort_dir='a'}

a or d is a valid value.

Now for the field name, your desired sorting field should already be sortable (ie, you can manually sort by clicking the field name at the top). Copy that URL and locate the fbrp_sort_field= value, which is probably something like 1&m203c0s

Now paste that into your smarty.

{FormBrowser browser='my-form' fbrp_sort_field='1&m203c0s' fbrp_sort_dir='a'}

and viola, it auto sorts.

Re: FormBrowser - How to sort fields.

Posted: Fri Feb 18, 2011 3:36 am
by tilde
ChrisF

Thank you.

Now the fields is sorted when I open the page.

Søren

Re: [Solved]FormBrowser - How to sort fields.

Posted: Fri Jun 24, 2011 2:39 pm
by Rolf
Problem and work-around confirmed.
Made a bugreport on this
http://dev.cmsmadesimple.org/bug/view/6601

Grtz. Rolf