Closed (duplicate)
Project:
Drupal core
Version:
4.6.0
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2005 at 23:08 UTC
Updated:
12 Nov 2006 at 22:00 UTC
Added ability to have an before each so as to allow linking to a page#foo when directing users to upload their user picture or whatever. I think this is really important for usability as the user account page can get rather long, and for the old folks who can't use the Internet that well, this is helpful.
Also, included a change to the user.module to write out a named anchor for the user picture as an example.
| Comment | File | Size | Author |
|---|---|---|---|
| common_anchor_names.patch | 1.02 KB | RobRoy |
Comments
Comment #1
RobRoy commentedComment #2
killes@www.drop.org commentedsee http://drupal.org/node/25480 for use case.
Comment #3
gordon commented-1
The addition of the anchor doesn't seem to be very drupalish. This IMO would be better if it was a separate function so that if can be used in more places than just the form_group. maybe a drupal_anchor() that can be called.
The example that has been provided, with the inclusion of the expanding and collapsing groups is no longs nessecary as they entire page may not be more than a single page so the browser will not be able to move anywhere.
Comment #4
Steven commentedYou don't need an anchor tag or a name attribute to scroll the page to a particular item, you can use the id attribute and on any element. This has been true since HTML4:
http://www.w3.org/TR/html4/struct/global.html#adef-id
This works for me in IE (6), Firefox and Opera. So the patch should instead be to pass HTML attributes to form_group(), so you can supply an id.
Comment #5
RobRoy commentedSteven, that sounds fine.
So you think there should be an attributes array for both the fieldset and the legend? The fieldset definitely needs the id so when you go to page.php#id it shows the group label -- I think that's important.
Let me know and I'll submit a patch for it.
Comment #6
RobRoy commentedThis is my old issue and pretty old. The new FAPI allows you to add attributes to form items, including fieldsets.
For an automated solution, let's continue in http://drupal.org/node/49103.