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.

Comments

ezra-g’s picture

Actually, outside the theme function is probably the right place for this. Stay tuned.

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new8.46 KB

Please see the attached patch. Note, if we don't have any fields, we don't need a fieldset ;).

ezra-g’s picture

Note that despite the totally confusing patch name, this patch actually does what it claims.

ezra-g’s picture

StatusFileSize
new3.03 KB

OK, this became too confusing for even me. The real patch is attached with a proper name.

ezra-g’s picture

Status: Needs review » Fixed
ezra-g’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Fixed » Patch (to be ported)
ezra-g’s picture

Title: Option to return array from theme_signup_user_form() » Hide serialized signup fields

More informative title.