So I'm working away on this fine and dandy new 4.7 forms structure.
Looks a bit verbose, but I can see how it all pays off.
BUT
I need a table. I want to use the nice Drupal table builder, and I'd like to use the nice form builder.
But damned if I can see that happening.
Yes, my data is tabular.
Currently I've got a handful of different kinds of custom widgets working there
paired_selects
combobox
dynamic_table_rows
and I'd consider converting them into re-usable form elements (using the new hook_elements) if there was any chance of using them under the new method.
But can anyone suggest how the heck I should be injecting 4.7 form element definitions into a table? Please don't tell me it's via #prefix and #suffix!
.dan.
Comments
realy good
i'm interesting by this
Scratching my own itch
The object: to use the forms API to render tabular data
This can probably be done by extending the form builder functions and inserting table structure where currently we have fieldset structure.
Table layouts are not all bad.
Sometimes, when dealing with actual data, a table is the right thing.
Could phpadmin work without tables?
Anyway, my data structure needs tables. And form elements inside them.
... Read the full story. Drupal.org doesn't want to host my post :(
I've done it
... at least to the point that I need to, and in a totally forms-API compliant way.
Source code, and a theory lesson provided.
Anyone with further insight into the forms API is welcome to contribute!
.dan.
.dan. is the New Zealand Drupal Developer working on Government Web Standards