This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Further Date Validation
Started 13 years ago by tmparisi | 6 posts |
- 
		
		
	
		
		
		In version 3 there is a checkbox to not let the user select weekends... is there a way to not let the user select a specific week day, such as Monday? Posted 13 years ago #
- 
		
		
	
		
		
		1) Yes you can disable Weekends. Choose the option, "Disable Weekend Dates" 2) For disabling a specific day of the week (that is, to choose a check box to disable every Monday, or whatever), I cant see an option for that. You can select specific dates however, (choose them from the calendar pop-up), so effectively using that option you can then go through and choose every Monday occurrence (a bit tedious but it is a work-around). There is no current option to actually choose "every (such and such) week day". Posted 13 years ago #
- 
		
		
	
		
		
		I would assume there has to be a way in the PHP to make it happen then. I know there was in v2, i've found those answers on this board. But is the coding and solution the same for v3? Posted 13 years ago #
- 
		
		
	
		
		
		Anyone have a PHP solution for this? Posted 13 years ago #
- 
		
		
	
		
		
		This is what was added to the post-functions.php file right above line 1367 ($form_unique_ip = $row['form_unique_ip'];).... thanks to MachForm it now works perfect: if ($form_id == 2) { 
 //date validation
 $date_element_id = 3;if (!empty($table_data['element_' . $date_element_id])) { 
 if (date("D",strtotime($table_data['element_' . $date_element_id])) == 'Mon') {
 $error_elements[$date_element_id] = 'You unable to select Moday';
 }} 
 }Posted 13 years ago #
- 
		
		
	
		
		
		Is it possible to disable the current date from the calender? Posted 13 years ago #
Reply
You must log in to post.
