![]() |
Sergey Kornilov admin 7/5/2008 |
You can use BeforeAdd/BeforeEdit events for this purpose. $date1 = strtotime($values["DateField"]); |
I
|
iripais author 7/5/2008 |
Thanks, it's working fine!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=30824&image=1&table=forumreplies' class='bbc_emoticon' alt=':lol:' /> |
J
|
Jane 7/7/2008 |
Hi, if($date1 > $date2) return true; else { $message = "Date can´t be lower than today's date"; return false; } |
I
|
iripais author 7/8/2008 |
Perfect, thanks :.) |
I
|
iripais author 7/10/2008 |
heyy, it's me again!! |
J
|
Jane 7/11/2008 |
Hi, if($values["group_size"] > $values["group_size2"]) return true; else { $message = "Group size 2 can´t be lower than group size"; return false; } |
I
|
iripais author 7/11/2008 |
It's not working!! |
J
|
Jane 7/11/2008 |
Try to use following code: $flag1 = 1; $flag2 = 1; $date1 = strtotime($values["Arrival_date"]); $date2 = strtotime("now"); $date3 = strtotime($values["Departure_date"]); if($date1 > $date2 && $date3 > $date2) $flag1 = 1; else { $message = "Arrival and Departure date can´t be lower than today's date"; $flag1 = 0; } if($values["Group_size"]>$values["Group_size_act"]) $flag2 = 1; else { $message = "Group size for activities can´t be bigger than booking group size"; $flag2 = 0; } if ($flag1 && $flag2) return true; else return false; |
I
|
iripais author 7/11/2008 |
Workin exacly the way I wanted it :-) |