I am using conditional recipients in my web form with a key-value input. I would like to populate the email subject field with the VALUE from the this component. Right now if I select this component, it adds the email address as the subject line. My key-value formatting is like this:
email@email.com|Subject Value
Is there a way to do this?
Thanks,
Maria
Comments
Comment #1
mariagwyn commentedAny way to do this?
m
Comment #2
quicksketchNo, this currently is not possible in an easy way. I believe you're able to use some addition submission code to set the subject but I haven't been able to look into it.
Comment #3
guz commentedIf you "print_r($form_values)" from the additional processing section and submit the form, do you see both the key/value (email@email.com|subject) in the array? If so, just pull that value, split at the pipe (ie: explode('|',$form_values['submitted'][1]);) and re-assign the piece you want to use.
Comment #4
whitingx commentedI'm having the same problem, I'd like the value and not the email address to add to the form. Using
shows only the key and not the value.
Comment #5
whitingx commentedJust in case this is useful for others.
I got round this by using conditional PHP (http://uk3.php.net/manual/en/control-structures.if.php) to echo the required value from the key it was returning.
If there is a cleaner way to do this I'd still appreciate hearing it.
Thanks.
Comment #6
uberhacker commentedAdd the following to template.php:
Comment #7
quicksketchThanks for the tip uberhacker! Closing after lack of activity.