Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have problems with components form. I changed button caption from "Add" to "Add component", and now adding components doesn't work.
Comment | File | Size | Author |
---|---|---|---|
#4 | webform_component_submit-d6.patch | 5.34 KB | quicksketch |
#3 | webform_component_submit.patch | 5.54 KB | quicksketch |
#1 | adding_components_doesn't_work-1681390-1.patch | 2.12 KB | taldy |
Comments
Comment #1
taldy CreditAttribution: taldy commentedThis patch fix the issue for me
Comment #2
quicksketchThanks for opening this report (and the patch!) It looks like there's quite a bit of cruft in these functions that need cleaning up. For example there's still code to "Publish" a node, which hasn't been needed since Webform 2.x. It's possible that this code was left there for code consistency between Webform 2.x and 3.x when the older version was still being maintained. Now however, we need to maintain consistency between 3.x and 4.x, so all this code needs updating.
Your patch makes a good start but needed to also separate out a #validate handler for the "Add" button. This patch adds that in, plus fixes several bugs with the validation, and adds PHPdoc to all the functions. Written against 4.x, it'll need backports to 3.x versions.
Comment #3
quicksketchAh, the patch for 4.x.
Comment #4
quicksketchThe above patch seems to apply to 7.x-3.x without any conflicts. Committed that one to 7.x-3.x and 7.x-4.x. Attached patch applied to 6.x-3.x.