HI Guys,
I am trying to figure out how to use radio group to decide which action to take after user submits the form.
I am making a material request form. if the user picks 1 of the option(by mail), no action is taken, just save their form info and send email.
if the user picks the 2nd option (download material online), then after the info is saved and emails are sent, I need to redirect them to the download link url.
Can anyone point me in the right direction on how this can be done??
Thanks!
I am trying to figure out how to use radio group to decide which action to take after user submits the form.
I am making a material request form. if the user picks 1 of the option(by mail), no action is taken, just save their form info and send email.
if the user picks the 2nd option (download material online), then after the info is saved and emails are sent, I need to redirect them to the download link url.
Can anyone point me in the right direction on how this can be done??
Thanks!
Hi d3vilr3d,
In the 'Onsubmit before' box test the value of the 'checkbox' variable. If it's Option 1 do nothing, let the email run its course. If it's Option 2 then do an immediate redirect. I don't remember which Joomla version you are using but for Joomla 1.0.x the code is something like:
In the 'Onsubmit before' box test the value of the 'checkbox' variable. If it's Option 1 do nothing, let the email run its course. If it's Option 2 then do an immediate redirect. I don't remember which Joomla version you are using but for Joomla 1.0.x the code is something like:
<?php
if ( $_POST['checkbox_name'] == 'Option_2' {
mosRedirect( "http://. . ." );
}
?>
Bob
Another question regarding this similar functionality. Is it possible to alter the email subject based on the radio group selection by user?
This topic is locked and no more replies can be posted.