theme_signup_user_form() is an theme-able function that decides which fields are visible on the signup form and are stored in a serialized array inside the signup. By default, it comes with Name and Phone number fields.
However, if you are running a site that only lets authenticated users sign up, and you're using *profile fields* to store this information, this form will be unnecessary 100% of the time.
Sure, you could create a custom theme function to override the form, but having the theme decide which form elements are present seems somewhat inconsistent with keeping presentation separate from functionality. It also makes it harder for non-coders to build a site that only wants authenticated users to register.
As a solution, let's define a site-wide variable, respected *inside the theme function* that can just return an array for us, so we don't have to override this function.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 856810-signup-form-array.patch | 3.03 KB | ezra-g |
| #2 | 856604-signup-user-reg.patch | 8.46 KB | ezra-g |
Comments
Comment #1
ezra-g commentedActually, outside the theme function is probably the right place for this. Stay tuned.
Comment #2
ezra-g commentedPlease see the attached patch. Note, if we don't have any fields, we don't need a fieldset ;).
Comment #3
ezra-g commentedNote that despite the totally confusing patch name, this patch actually does what it claims.
Comment #4
ezra-g commentedOK, this became too confusing for even me. The real patch is attached with a proper name.
Comment #5
ezra-g commentedThis is committed.
http://drupal.org/cvs?commit=470384
Comment #6
ezra-g commentedComment #7
ezra-g commentedMore informative title.