going to an url after radio button answer submission

Status
Not open for further replies.

jmdc

Member
Hello guys,

I have a radio button element with 2 possibilities (yes/no). How can i go to a site if answer is yes and another one if answer is No?

Thanks a lot.,;)
 
If i put this php code in the validation plugin "redirect" condition in my form whose element is "nova" from "familia" table:

$app = JFactory::getApplication();
if ($nova == '1') {
$app->redirect('http://whatever.com/YES');
exit;
} else {
$app->redirect('http://whatever.com/NO');
exit;

it doesn?t work for 1st condition...why??

Any suggestion?!
Thanks
 
Create 2 redirect plugins.
1 plugin
Jump Page field:
http://site1.com;
condition field:
PHP:
$value = '{table_name___radioelement_name_raw}';
if($value == '1'){
return true;
}
else{
return false;
}
2 plugin
Jump Page field:
http://site2.com
condition field:
PHP:
$value = '{table_name___radioelement_name_raw}';
if($value == '0'){
return true;
}
else{
return false;
}

$value = 1 - if radioelement plugin have suboption with label "YES" have value 1
$value = 0 - if radioelement plugin have suboption with label "NO" have value 0
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top