By mgabalins on
Hi,
Is there any *official* way of adding my own form element types - e.g. '#type' => 'directory'.
I would like to write my own rendering and basic processing of the type.
Thanks in advance.
Maris
Hi,
Is there any *official* way of adding my own form element types - e.g. '#type' => 'directory'.
I would like to write my own rendering and basic processing of the type.
Thanks in advance.
Maris
Comments
This book page might be helpful
How it was done for image buttons.
http://drupal.org/node/51526
sure
check hook_elements.
The only implimentation of it is system_elements.
--
The future is so Bryght, I have to wear shades.
hook_elements
see http://api.drupal.org/api/HEAD/function/hook_elements
Then define a theme function for your element type. Example:
Thanks :)
Thanks for help.
MG