This is a stupid question, but I'm stupid today. Just so you know, I searched but did not find the answer.

The form has a yes/no element. I want to redirect to one page if the user checks "yes" and to another page if the user checks "no." For some reason, I can't figure out how to do it. Would someone mind holding my hand on this?

Help is appreciated.

Comments

Critical Tinkerer’s picture

Here are some simple demonstrative examples:

<?php 
  if ($form_values['submitted_tree']['sex'] == 'female') 
{$node->webform['confirmation'] = 'http://google.com';} 
?>
<?php 
  if ($form_values['submitted_tree']['sex'] == 'female')
   {$node->webform['confirmation'] = 'internal:female';} ;
  if ($form_values['submitted_tree']['sex'] == 'male')
   {$node->webform['confirmation'] = 'internal:male';}
?>

Use 'internal:' for paths within the site.

If you need to confirm the "submitted_tree" array values, go to .../admin/settings/webform Advance Settings and set to Full Debug. When you submit the form the submitted_tree array will be displayed.

CharlieHipHop’s picture

Great! Thanks so much.

Critical Tinkerer’s picture

Status: Active » Closed (fixed)