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.
In some cases it would be good to be able to use [submission:values:…] tokens in default values of other components. Naturally this would be limited to work with the values from earlier pages in the form.
Proposed solution
- Create a temporary submission object
webform_client_form()
and pass it to all_webform_render_*()
implementations. - Pass the
$submission
parameter to all invocationswebform_replace_tokens()
andwebform_filter_descriptions()
(at least in_webform_render_*()
implementations.
Current state
- A patch implementing this is provided
- The idea and its implementation need review and discussion.
Comment | File | Size | Author |
---|---|---|---|
#4 | diff_02-04.txt | 4.64 KB | lucassc |
#4 | 2817093-04.patch | 17.08 KB | lucassc |
|
Comments
Comment #2
torotil CreditAttribution: torotil at more onion commentedComment #3
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 2 year old patch in #2 does not apply to the latest 7.x-4.x-dev so needs a reroll.
Comment #4
lucasscRerolled for 7.x-4.x.
I was not able to add an interdiff:
So I just added a diff, hope it does the job.
Please, review.
Comment #5
lucassc