I am creating two paged webform where the user selects the value on the first page. I want to show the same value as default value on second page. For example: On first page the form looks like:
Select the fruits you like?
a) Apple
b) Banana
c) Orange
d) Kiwi

On next page, I created a page of type text field and used [submission:values:field_key] to get the values of the selected fruits but it did not display the selected values. The environment that I used is a clean instance of drupal 7.31, webform 7.x-4.1 and Token 7.x-1.5 modules and modules required by webform.
Am I doing something wrong here and missing some configuration?

Thanks

Comments

adanielyan’s picture

Assigned: sachit.thapa » Unassigned

I have the same issue. Can't use any field values from previous pages on other pages on paginated forms.

DanChadwick’s picture

I would need to read the code to figure out whether this is supposed to work, but it sure sounds like it should. Remember that form_keys within fieldsets much include the parents as a path. Maybe this is the cause of your issue?

Otherwise it would be great if someone could do some digging and figure out what is going on here. I can't personally debug every issue. ;)

adanielyan’s picture

Thank you for responding!

In fact none of the [submission:] tokens work on the form, even the [submission:sid]. And I don't have any fieldsets. I tried this on a clean Drupal installation with only webform, views, and token modules installed. I am struggling with this issue for a few days now and don't know where to start digging in. Any advice would be helpful.

salvatore.riegler’s picture

Subscribing. I'm having the same issue.

DanChadwick’s picture

Title: Token [submission:values:key] not working » Add submission token [submission:values:key] support to components
Component: Documentation » Code
Category: Support request » Feature request
Priority: Major » Normal

Submission tokens are not valid as default values or in the description field for components. The submission doesn't exist when the form is being filled out (unless there is already a draft or the user is editing an existing submission).

I suspect that this sort of functionality would be added via the conditionals interface, where value can be set when other values are changed. Tokens could be supported there.

This would be pretty complicated to implement, as javascript support would be needed for intra-page conditionals. I do like the feature, however, and would be receptive to a patch.

DanChadwick’s picture

Title: Add submission token [submission:values:key] support to components » Set component values based upon tokens and/or other conditional values
DanChadwick’s picture