I have modified signup_build_signup_data a bit to change checkbox 1 or 0 values into 'yes' or 'no'.

Comments

dww’s picture

Version: 5.x-1.0 » 5.x-2.x-dev
Status: Active » Needs work

a) New features only go in HEAD (5.x-2.x-dev)

b) You need to wrap those strings in t() so they're translatable.

c) Seems like a lot of code duplication -- perhaps we could have a simple helper method that handles special cases in outputting signup data?

stborchert’s picture

Status: Needs work » Needs review
StatusFileSize
new2.62 KB

Added a new function to render the data and output the checkbox value as t('Yes') or t('No').
Data of all other elements is untouched (unless you want a check_plain()).

dww’s picture

Assigned: Unassigned » dww
Status: Needs review » Needs work

As expected, this doesn't apply after #137609: Theme function for signup_build_signup_data. I'll reroll now.

dww’s picture

Assigned: dww » Unassigned

Bah, this is a can of worms in general. If the signup form is nested at all (the whole point of those recursive theme functions being recursive), this code doesn't work:

$element_type = $signup_user_form['signup_form_data'][$key]['#type'];

Now that #137609 is done, sites can at least fix this themselves if they want. I'm sort of tempted to won't fix, but if someone wants to work out a clean general solution, I'll take another look.

duaelfr’s picture

Status: Needs work » Closed (won't fix)

This version of Signup is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.

simon georges’s picture

Status: Closed (won't fix) » Needs work

Reverting recent closing.