I think name and e-mail address are mandatory when signing up. I also think that logged in users should not have to type in this information, as it is already available in the $user object. I attached a patch that adds '#required' and '#default_value' to the name and e-mail fields of the signup form. The default values are filled with data from the $user object.

Comments

dww’s picture

Status: Active » Needs work

this feature request is a symptom of much larger issue facing the signup module. the whole idea of the current signup form is that site admins can customize these fields however they like by editing the signup.theme file. for example, at my site (http://baterialucha.org) for the brazilian percussion ensemble i direct, the name/email are useless in the signup form, since i only allow signups for authenticated users, and i therefore know who they are from their profile. instead, the fields that matter at my site are "Can you attend?" (a dropdown with yes, no, and 4 or 5 shades of maybe), "Gear" (what instruments/gear are you planning to bring to the gig/event), and "Notes" (any other generic text).

ideally, you don't want this set of fields to be site-wide, but per event (e.g. events on our calendar where i'm not trying to get people to come to play, but to attend someone else's show, don't need the "Gear" field)...

the previous maintainer of signup talked about trying to interface with the "survey.module" (which i've never used or even looked at), as a way to allow site admins and node authors to define the questions for their signup form on a per-node basis. i have no idea how easy/hard that would be.

as i've written in http://groups.drupal.org/node/374, http://drupal.org/node/52895, and other places, ultimately, i think the signup module should be completely thrown out in favor of using CCK and node relationships (each relationship between a user and a node (event) should itself be a CCK node with whatever fields you want, and you can have multiple kinds of relationships to nodes by defining different CCK node types with whatever distinct sets of fields you want). however, that's a long way's off, and i'm still relying on signup in the meantime. ;)

so, i'd be willing to apply a patch like this in the short term, but i'd like to a) include some documentation about the use of #required and #default_value in this theme function as part of the INSTALL.txt file and b) continue to investigate these more flexible solutions in the medium and long term so that this stuff can be modified on the site (instead of in the code) and can be specified on a per-node basis. also, i don't fault you at all since the existing signup code uses the coding style of putting all form elements in an array on a single line, but i'd like to move towards putting each element in its own line to make the code easier to read (like they do in most places in the drupal core). so, if you're going to roll a new patch (to add something to the INSTALL.txt file) please consider re-formatting these lines. otherwise, i'll just handle it when i'm getting ready to commit this (just need to do some testing of it locally, though the patch certainly looks reasonable).

thanks,
-derek

dww’s picture

for more on flexible fields for signups, see http://drupal.org/node/29568

dww’s picture

Assigned: Unassigned » dww
Status: Needs work » Fixed

committed the same basic idea (but cleaned up formatting, comments, INSTALL.txt, etc) to HEAD and DRUPAL-4-7. thanks to the anonymous signups patch, there's now code to conditionally ask for (and require) the email address, so it's silly to have that as a default in this form, too. so, i just made Name required, and used $user->name as the #default_value...

Anonymous’s picture

Status: Fixed » Closed (fixed)