Drupal automatically adds <div>'s and classes around form items. All form elements will have the attribute class = "form-item"
. How do I override this default behavior?
相关问题
- Drupal 8: How do I customize a form widget to show
- drupal :: order complete hook and upgrade user per
- Change redirect in Drupal 7 for Password Recovery
- Adding attachment to Jira's api
- Understanding htaccess Filesmatch code
相关文章
- Render a Drupal node
- How to allow multiple blocks in a module of Drupal
- How can I redirect a Drupal user after they create
- Drupal 6: Getting custom fields into the database
- Drupal 7 retain file upload
- Drupal - Set 'user/%/edit/uprofile' to def
- Drupal Session User id for independent script
- Drupal - Replace the home page
In real experience these are useful classes, but if you want to extremely clear form you can theme each form element or theme form:
Much closer to your task i found here (not only zen theme and not only for user login block): Custom User Login Block on Drupal 6 Zen sub-themes in "Advanced theming" part, see bottom code.
If you insist on changing it, it's added in the theme_form_element function. You can override it by copying that function to your theme's template.php file and renaming it THEMENAME_form_element (substituting the name of your theme in place of "THEMENAME") or phptemplate_form_element and removing the part that adds the class.