Working on from my previous post. http://www.chronoengine.com/forums.html?cont=posts&f=26&t=23095 I am now adding a check to confirm the date is not too far in the future.
Everything works fine except the validation message which I want to say
"We can not accept bookings after 2012-12-31."
or
"We can not accept bookings after 31 Dec 2012."
but using the code below the date value '$d' is just ignored giving "We can not accept bookings after ."
any ideas, what my stupid error is?
Everything works fine except the validation message which I want to say
"We can not accept bookings after 2012-12-31."
or
"We can not accept bookings after 31 Dec 2012."
but using the code below the date value '$d' is just ignored giving "We can not accept bookings after ."
any ideas, what my stupid error is?
$db =& JFactory::getDBO();
$query = "
SELECT `latestdate`
FROM `#__chronoforms_data_HutBookingLimit`
WHERE `cf_user_id` = '90e7227465f69bf8ec01acc5f8c17c52' ;
";
$db->setQuery($query);
$d = $db->loadResult();
if($from_date > $d)
{
$error_count++;
$form->validation_errors['from_date'] = "We can not yet accept bookings after " . $d. ".";}