<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Restrict Dates</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Restrict Dates</description>
<language>en</language>
<pubDate>Wed, 06 May 2026 11:14:26 +0000</pubDate>

<item>
<title>petercamburn on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12882</link>
<pubDate>Fri, 11 Nov 2011 05:42:26 +0000</pubDate>
<dc:creator>petercamburn</dc:creator>
<guid isPermaLink="false">12882@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I would like to do something very similar, except I would like to block dates starting 2 days from the current date.&#60;/p&#62;
&#60;p&#62;So if today is November 10, they can only select dates November 13 and later. &#60;/p&#62;
&#60;p&#62;Can you help?
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12775</link>
<pubDate>Tue, 18 Oct 2011 19:38:57 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">12775@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Are you sure you have put the form and element id correctly ?&#60;br /&#62;
or could you post your form url and code in here ? otherwise, you can send it to this email address &#60;/p&#62;
&#60;p&#62;customer.service [at] appnitro.com&#60;/p&#62;
&#60;p&#62;I will help you to check it
&#60;/p&#62;</description>
</item>
<item>
<title>alfonso on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12774</link>
<pubDate>Tue, 18 Oct 2011 14:04:55 +0000</pubDate>
<dc:creator>alfonso</dc:creator>
<guid isPermaLink="false">12774@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks. Don't work. I don't know if may be date format. I have spanish DD/MM/YYYY when create form
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12765</link>
<pubDate>Mon, 17 Oct 2011 20:17:19 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">12765@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;You can try to follow these steps for the customization, edit &#34;includes/post-functions.php&#34; file and go to line 720 for these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$validation_result = validate_element($target_input,$rules);

if($validation_result !== true){
	$error_elements[$element_id] = $validation_result;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then put these code bellow that line &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (!empty($target_input[&#38;#39;element_date&#38;#39;])) {
	if($form_id == 16 &#38;#38;&#38;#38; $element_id == 1){

		$selected_date = date(&#38;#39;Ymd&#38;#39;,strtotime($target_input[&#38;#39;element_date&#38;#39;]));
		$today_date = date(&#38;#39;Ymd&#38;#39;);

		if($selected_date &#38;lt;  $today_date){
			$error_elements[$element_id] = &#38;quot;Can not select previous date&#38;quot;;
		}
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;in there I assume your form id is 16 with date element id 1. Don't forget to change those id's with yours.
&#60;/p&#62;</description>
</item>
<item>
<title>alfonso on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12758</link>
<pubDate>Sat, 15 Oct 2011 01:23:12 +0000</pubDate>
<dc:creator>alfonso</dc:creator>
<guid isPermaLink="false">12758@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm also interesting to do the same. Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12379</link>
<pubDate>Thu, 28 Jul 2011 17:28:49 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">12379@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;I'm afraid there no easy way to do this with current version of MachForm.&#60;br /&#62;
However, if you don't mind with some PHP customization, it is possible to restrict the dates.&#60;/p&#62;
&#60;p&#62;Your users will still be able to select any date when filling the form. However, when the form being submitted, it will check the date being entered and display error message if the selected date is a date prior to the current date.&#60;/p&#62;
&#60;p&#62;Is that okay for you? If so, I can provide you with the code for this.
&#60;/p&#62;</description>
</item>
<item>
<title>gilman01 on "Restrict Dates"</title>
<link>https://www.machform.com/forums/topic/restrict-dates#post-12367</link>
<pubDate>Wed, 27 Jul 2011 02:27:56 +0000</pubDate>
<dc:creator>gilman01</dc:creator>
<guid isPermaLink="false">12367@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Anyone know how I might restrict a user from selecting a date prior to the current date? I have created an appointment form but I do not want to allow someone to select a date prior to the current date they fill out the form.&#60;/p&#62;
&#60;p&#62;Any suggestions would be greatly appreciated.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
