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.