Community

Webform is printing token key literals when the values are not available is there a way to prevent it

I have a web form with three fieldsets each set containing a collection of radio buttons specifying the time, one for :lunch, the second for dinner and the third for sundays. I have the custom email template that contains the following line

%value[number_of_people] at %value[lunchset][lunch] %value[dinnerset][dinner] %value[sunday_dining][sunday_special].

I expected that only tokens that contain values would be printed and the other tokens will be replaced with blanks. For example if the visitor chooses a dinner time then %value[lunchset][lunch] would be blank so would %value[sunday_dining][sunday_special] hence I expected the above line to print "2 people at 20:30" but instead my email body has as follows "2 People at [lunch] 21:00 [sunday_special]"

Is there a way to avoid printing the token literals when the values are empty. Any help would be appreciated.

Comments

Patch to resolve this

You can find the patch for webform 3.11 in this post. http://drupal.org/node/1271906. Trying to patch webform 3.18

Acer Aspire 5745
[i5 430M, 3GB, 320GB]
Ubuntu 12.04 (Precise Pangolin)
Drupal 6.15, 7.x
Aware Hosting, Go Daddy, LimeDomains, Rackspace, Tata Instacompute

Patch for 3.18 submitted

The patch for 3.18 submitted to Webform.

Acer Aspire 5745
[i5 430M, 3GB, 320GB]
Ubuntu 12.04 (Precise Pangolin)
Drupal 6.15, 7.x
Aware Hosting, Go Daddy, LimeDomains, Rackspace, Tata Instacompute

nobody click here