Drupal questions - customizing form_altered modules
문제
This week I have figured out how to modify form elements in the location module
using form_alter and the custom element hook_elements()
: need some tips on Drupal $form value
I was able to to hide elements using unset eg: unset($element['locpick']['user_latitude']);
Also added css with drupal_add_css to hide unwanted groups, and change margins, borders & padding
However, I have a few questions:
- how can I add additional text header between fields?
- how can I change input field length?
- is it possible to move fields around or put them in a table?
해결책
Also added css with drupal_add_css to hide unwanted groups
I highly advise against this. Use the Form API proper to control forms.
다른 팁
learn this: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6
1: set weight of two fields, for example, to 10 and 12. Add new "item" field with weight 11.
2: see "size" in top link.