I use php in webform to redirect to an URL after the form is submitted

$email = [submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_email_email:nolabel];

header('Location: /submit/send.php?email='.$email);  

It doesnt work when I submit, it redirect me to : www.site.com/submit/send.php?email=

if I change the $email to :

$email = [submission:values:civicrm_1_contact_1_fieldset_fieldset:civicrm_1_contact_1_contact_first_name:nolabel];

It does indeed redirect to www.site.com/submit/send.php?email=myfirstname

Why my email address is not working ? Any idea?

I found the same question here without any answer : https://www.drupal.org/node/2767233

  • 1
    Hi Gustavo, can you give us a little more information about what you are working with, such as CiviCRM version and what CMS you are using. Also, can you better describe what you are trying to accomplish by adding PHP instead of using the tools available within the webform settings? Thanks!
    – Christia
    Dec 23 '16 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.