I've seen references to conditional redirects on the forums but can't figure out what the actual code would be. The form has:
<input value="Save this Member and Add Another" name="button_1" type="submit" />
<input value="Save this Member and Finish" name="button_2" type="submit" />
In both cases, I want the e-mail to go out and the data saved to the database, but the first case should reload the form again, and the second case should follow the redirect already specified in the form settings.
I don't know PHP well ... I'm thinking I just a need a couple lines in the OnSubmit area, something like:
<?php
if( trim($MyForm->formparams('submit')) == 'button_1') {
$MyForm->setFormData('redirecturl', "formurlhere”);
}
?>
Is that even close?
<input value="Save this Member and Add Another" name="button_1" type="submit" />
<input value="Save this Member and Finish" name="button_2" type="submit" />
In both cases, I want the e-mail to go out and the data saved to the database, but the first case should reload the form again, and the second case should follow the redirect already specified in the form settings.
I don't know PHP well ... I'm thinking I just a need a couple lines in the OnSubmit area, something like:
<?php
if( trim($MyForm->formparams('submit')) == 'button_1') {
$MyForm->setFormData('redirecturl', "formurlhere”);
}
?>
Is that even close?