From date to date.
N. rooms - N. Adults - N. childs (value 1 to 3) and age of the childs (1,2 or 3 dropdowns)
button search
* For redirect to a url with a differents parameters.
I put a php code into On submit code before send email:
<?php
$loc = JRequest::getVar('loc', '', 'post');
$tser = JRequest::getVar('tser', '', 'post');
$dtd = JRequest::getVar('dtd', '', 'post');
$dth = JRequest::getVar('dth', '', 'post');
$buni = JRequest::getVar('buni', '', 'post');
$badu = JRequest::getVar('badu', '', 'post');
$bnin = JRequest::getVar('bnin', '', 'post');
$bed1 = JRequest::getVar('bed1', '', 'post');
$bed2 = JRequest::getVar('bed2', '', 'post');
$bed3 = JRequest::getVar('bed3', '', 'post');
$MyForm->formrow->redirecturl = "http://midomain.com?tser=$tser&dtd=$dtd&dth=$dth&buni=$buni&badu=$badu&bnin=$bnin&bed1=$bed1&bed2=$bed2&bed3=$bed3";
?>
Right now works perfect but I need to keep send mail to yes just to execute the code on submit. Is there any way to disable send mail and keep executing the code above on submit and construct the url to redirect?. Also a little question about time to process. Is a bit slow since takes 3-4 second thinking before go to the url. Is there any way to better performance?
* Child question and validation
The way that should work is show a dropdown with value 1, 2, 3 starting in value="0". So when choose 1 apper 1 drodown to select the age. With value 2 appers 2 dropdown and so on.
If Child (bnin) is no selected (so value=0) age of chidls bed1,bed2,bed3 pass value="0" so is ok
If bnin value=1 then 1st dropdown for age(bed1) must be different from 0 and any age must be selected.
bnin value=2 so 2 dropdown and must be differents from "0" and any value (age) must be selected.
Any idea how to do it? Any help will be very welcome