[drupal-devel] Rewriting use of forms in Drupal

Stefan Nagtegaal Drupal-Devel at iStyledThis.nl
Fri Jun 3 10:20:17 UTC 2005


Op 3-jun-2005, om 11:23 heeft Gerhard Killesreiter het volgende  
geschreven:

> Instead of
>
> $output .= form_textfield(t('Title'), 'title', $edit->title, 60,  
> 128, NULL, NULL, TRUE);
>
> we'd write
>
> $output['title'] = array('type' => 'textfield',
>                          'title' => t('Title'),
>                          'name' => 'title',
>                          'value' => $edit->title,
>                          'size' => 60,
>                          'maxlenght' => 128,
>                          'decription' => NULL,
>                          'attributes' => NULL,
>                          'required' => TRUE
>                         );
>

I _really_ like this way of doing code. it's very easy to understand  
and makes more sense imo than the current way we do things..

Gerhard, If you need help with coding please e-mail me.. I'm very  
willing to help you..


Stefan.



More information about the drupal-devel mailing list