[support] user view & form $op

Ivan Sergio Borgonovo mail at webthatworks.it
Fri Apr 25 11:02:01 UTC 2008


It seems there are a lot of chances to avoid code duplication feeding
view with the form you provide in form in hook_user.

The array provided to the renderer of view is so similar and still
different enough and I think it is a pretty common problem to have a
form and a static presentation of what was inserted.

I'd like to avoid to reinvent the wheel so before I think to write
some code that can turn a form into an array similar to the one
passed to hook_user for the view $op... I'd like to hear if anyone
has a pre-cooked solution, some example, some snippet of code,
opinions...

Meanwhile I may ask if this could be an area of improvement for
future Drupal releases.
This could even be part of the future FAPI.
After submit:
* redirect to form
* redirect somewhere else
* present a static "themable" summary of the submitted data

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the support mailing list