Hello,
great module, but is there the possibility to sort the table?
Using this, breaks the table (it´s empty):
array('data' => t('Cabin')),
array('data' => t('Price'), 'field' => 'price', 'sort' => 'desc'),
greetz
Alex
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | screenshot I.gif | 23.58 KB | kasalla |
| #2 | screenshot II.gif | 7.01 KB | kasalla |
Comments
Comment #1
heine commentedhttp://heine.familiedeelstra.com/coding-help-tips
Comment #2
kasalla commentedOk, I try to make the issue more clear....
I want to set up a tableselect table via elements module.
The working code looks like this:
The output is a it is supposed to be...S. screenshot I
Now I want to make the price sortable. Using common practice, it schould look like this:
In the second case the table itself is shown, but without the options. S. screenshot II
Needs still more info?
greetz
Alex
Comment #3
kasalla commentedNo idea?
Comment #4
Max_Headroom commentedSorry for pointing away from here, but maybe this might help: TAPIr
Docs here.
Have a look how you can show forms inside table. Maybe it will help you sort the fields?
I haven't tested it myself, I have also just read the docs.
Good luck!
Comment #5
wim leersI think you'll have to do the sorting yourself and then use #weight for each option inside #options.
Of course, this could be supported out of the box, but it'd be a new feature.
Comment #6
wim leersApparently, it's supported, but it's very poorly documented: http://heine.familiedeelstra.com/node/1428.
Comment #7
wim leersCan now be considered a duplicate of #241697: Extended documentation on provided elements.
Comment #8
kasalla commentedHey, thx for reply. I think we can close this one.
Using uasort() did it.