I'm trying to release a usable version of Views Form Fields module using the new form capabilities of views 3 introduced a few months ago.
After playing a bit with the handlers I'd noticed that there is really hard to define a useful name for a form field due views uses the internal name of the field defined in $views->field.
Also, each item of a row is only named with the id of the row. This behavior reduces a lot the possibilities to use an id from other field of the view, like a uid or a nid. It would be nice to see, after submit the form something like:
dsm($form_state['values']);
array(
'my_field' => array(
'nid:23-row:0' => 'Something',
'nid:25-row:1' => 'Something else',
//...
)
)
So, it would be nice to give more control to handlers to edit the values that identifies the form fields and each items.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1425378.views_.3.x.patch | 3.44 KB | dagmar |
#3 | 1425378.views_.3.patch | 3.44 KB | dagmar |
#1 | 1425378.views_.patch | 3.43 KB | dagmar |
Comments
Comment #1
dagmarHere is the patch. I tried to make it compatible with the previous version of the form api. But I have updated the docs to indicate how to make use of the new methods.
Comment #2
dawehnerThis must be magic, as you call a function by it's string. You probably wanted to use $this->form_element_row_id($row_id); here instead
The patch looks clean and shouldn't break something. Though i would like to get an oppinion of bojanz as he uses it and it shouldn't break his module.
It's cool to know that you continue to work on views form fields.
Comment #3
dagmarFixed the this->form_element_row_id($row_id); call in the docs.
Comment #4
dawehnerJust tested vbo, nothing changed.
Thanks for the patch.
let's get the patch into 6.x-3.x as well.
Comment #5
bojanz CreditAttribution: bojanz commentedThis is / was a benign patch. Nice job.
Comment #6
dagmarHere is the 6.x-3.x version.
Comment #7
MustangGB CreditAttribution: MustangGB commented