This patch makes it possible to alter the value of a possible submission component value when being submitted.

Comments

ruudvanoijen created an issue. See original summary.

ruudvanoijen’s picture

Status: Active » Needs review
StatusFileSize
new1.62 KB

The patch

Status: Needs review » Needs work
paulvandenburg’s picture

Status: Needs work » Needs review
StatusFileSize
new2.04 KB
new1.98 KB

I don't know why that patch failed, the test results all seem to have passed?

However I did find some stuff that could be better.
- The hook pre save is not the best place to perform the conversion.
Instead use a value_callback on the element so the converted value is converted everywhere, both on the preview page as well as navigating back and forth on a multi page form.
- I think the message for the new checkbox could be more clear.

I've made the mentioned modifications in this patch.

Status: Needs review » Needs work
tvoesenek’s picture

Status: Needs work » Reviewed & tested by the community

Patch works as described.

liam morland’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for the patch.

In webform_textfield_uppercase_value(), $input should not have a default value because it is followed by a parameter that does not have one. The new feature needs a test. Please run a coding standards check on the patch.

liam morland’s picture

Status: Needs work » Closed (outdated)

Drupal 7 is no longer supported. If this applies to a supported version, please re-open.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.