[development] Forms API "Widgets", AJAX and non-JavaScript

Rob Thorne rob at torenware.com
Thu Feb 1 05:31:31 UTC 2007


That's a good one to know about.  Yeah, I'd probably want to do that.

The other side of this is:  the JavaScript widget.

Anybody recommend how to get the effect of a dojo combo box using jquery?

Rob

Gerhard Killesreiter wrote:
> Rob Thorne wrote:
>> I've done a couple of projects that needed custom "widgets" to use 
>> within Forms API, something that you might write into code with 
>> something like....
>>
>>    $form['some_text'] = array('#type' => 'textfield', ....);
>>    $form['event_date'] = drupal_widget_date($title, $default,
>>    $options....);
>>    ...
>
> Are you maybe looking for hook_elements?
>
> Then you could do:
>
> $form['event_date'] = array('#type' => 'my_date', ...);
>
>
> Cheers,
>     Gerhard



More information about the development mailing list