Hey Bruno,
Thanks for quick response. Removed the array but it still didn't work.
I'll try the wrapper snippet option and let you know how I get on.
UPDATE: Ok I'm either not getting this or it doesn't work.
I've added snippet call as suggested, and replaced the Formit call with the following:
but that produced nothing.
Then added the formit properties from before as:
[[!ReferralRedirect? &submitVar=`go` &hooks=`redirect` &vTextRequired=`All fields must be completed` &validate=`firstname:required,lastname:required,phone:required,mobile:required,gp:required` &store=`1` &redirectTo=`[[!+formReferral]]`]]
But still no joy.
I do need to store info from this first form across to the next form depending on whether a self referral or a professional referral. Did come across this post
forums.modx.com/thread/80110/formit-redirect-regarding-radio-button-selected but that didn't seem to want to work either! and that did work once I changed some of my parameters as follows:
<?php
$value = $hook->getValue('referral');
switch ($value) {
case 'self':
$url = $modx->makeUrl(36);
$modx->sendRedirect($url);
break;
case 'professional':
$url = $modx->makeUrl(37);
$modx->sendRedirect($url);
break;
}
return;
[[!FormIt? &submitVar=`go` &hooks=`ReferralRedirect,redirect` &vTextRequired=`All fields must be completed` &validate=`firstname:required,lastname:required,phone:required,mobile:required,gp:required` &store=`1` ]]
<input type="hidden" name="referral" value=""/>
<input type="radio" name="referral" value="self"><label>Self Referral</label> <br/>
<input type="radio" name="referral" value="professional"><label>Professional Referral</label>
UPDATE: This does send you to different pages based on radio selection but now it doesn't store the data across...
[ed. note: boomerang last edited this post 12 years, 9 months ago.]