I just wanted to raise the issue of naming standards within the Forms API. In much the same way as modules have a naming standard basically requiring all modules to append all functions with modulename_help, modulename_menu, etc. i think encouraging/requiring the same format in forms. Here is why:

When you create a page that has multiple forms, like say a login box, a search box, and a contact form, you get multiple validation errors. Now this can be solved by individual developers by hacking thge core modules and changing the $form array value for the affected elements, but i think having a naming standard in place for form elements much the same as that of modules would solve this and help drupal out put pure clean validated XHTML.

An example would be $form['search_submit'], $form['user_submit'], $form['contact_submit'], this would then render all the elments with module specific DOM id's.

Just a thought, hope it is a good one that other s agree with.

Comments

VM’s picture

Version: 6.x-dev » 7.x-dev
arcaneadam’s picture

Just wondering if this is something worth looking at

arcaneadam’s picture

Wanted to bump this as I think it is still a good idea for helping Drupal output clean an valid XHTML.

Wim Leers’s picture

Issue summary: View changes
Status: Active » Closed (outdated)