<?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: Thought I'd share: if a user needs to pick a Start Date and an End Date . . .</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Thought I'd share: if a user needs to pick a Start Date and an End Date . . .</description>
<language>en</language>
<pubDate>Sun, 03 May 2026 20:39:00 +0000</pubDate>

<item>
<title>williamansley on "Thought I'd share: if a user needs to pick a Start Date and an End Date . . ."</title>
<link>https://www.machform.com/forums/topic/thought-id-share-if-a-user-needs-to-pick-a-start-date-and-future-end-date#post-17241</link>
<pubDate>Fri, 15 Feb 2013 23:46:24 +0000</pubDate>
<dc:creator>williamansley</dc:creator>
<guid isPermaLink="false">17241@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This is a great example of the value of this forum. Petermgr, I join with Dave and Saghalie in thanking you for posting your original code and the followup you received from Andar. I also agreed that Appnitro provides exceptional support. &#60;/p&#62;
&#60;p&#62;However, I have to state for the record that this functionality should be built into Machform; we should not have to customize the base code to have this feature, especially since we need to provide separate customization in the base code for every form in which we want this feature to work. Yuniar, I request that you please add this feature to your to-do list if it isn't there already.
&#60;/p&#62;</description>
</item>
<item>
<title>Petermgr on "Thought I'd share: if a user needs to pick a Start Date and an End Date . . ."</title>
<link>https://www.machform.com/forums/topic/thought-id-share-if-a-user-needs-to-pick-a-start-date-and-future-end-date#post-17221</link>
<pubDate>Fri, 15 Feb 2013 06:26:11 +0000</pubDate>
<dc:creator>Petermgr</dc:creator>
<guid isPermaLink="false">17221@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Glad to contribute Dave and Saghalie,&#60;/p&#62;
&#60;p&#62;I heard back from Andar in support (their great btw!)  and he suggested this code as well:&#60;/p&#62;
&#60;p&#62;&#34; . . .  .Or you can try with these custom code. You can add it around line 1515 above line :&#60;/p&#62;
&#60;p&#62;$process_result['form_redirect']  = $form_redirect;&#34;&#60;/p&#62;
&#60;p&#62;Put these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 13688){

            if(date(&#38;#39;Ymd&#38;#39;,strtotime(trim($table_data[&#38;#39;element_9&#38;#39;]))) &#38;gt; date(&#38;#39;Ymd&#38;#39;,strtotime(trim($table_data[&#38;#39;element_42&#38;#39;])))){
            $error_elements[&#38;#39;9&#38;#39;] = &#38;quot;Your End date must be AFTER your start date!&#38;quot;;
            $error_elements[&#38;#39;42&#38;#39;] = &#38;quot;Your End date must be AFTER your start date!&#38;quot;;
            }
            }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#34;That would show the highlight color on date field.&#34;&#60;/p&#62;
&#60;p&#62;So I tried it, and it works great!   Here is a screen shot I took of the code and the warning a user receives if the Start Date is later than the End Date:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://img.photobucket.com/albums/v209/Peterout/MachForm/DateCompare.jpg&#34; rel=&#34;nofollow&#34;&#62;http://img.photobucket.com/albums/v209/Peterout/MachForm/DateCompare.jpg&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Peter
&#60;/p&#62;</description>
</item>
<item>
<title>Saghalie on "Thought I'd share: if a user needs to pick a Start Date and an End Date . . ."</title>
<link>https://www.machform.com/forums/topic/thought-id-share-if-a-user-needs-to-pick-a-start-date-and-future-end-date#post-17215</link>
<pubDate>Fri, 15 Feb 2013 04:15:22 +0000</pubDate>
<dc:creator>Saghalie</dc:creator>
<guid isPermaLink="false">17215@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Petermgr,&#60;/p&#62;
&#60;p&#62;Awesome!  Thanks for your input.  As DaveVoss stated: &#34;I like that communal support&#34;&#60;/p&#62;
&#60;p&#62;Regards,&#60;/p&#62;
&#60;p&#62;Saghalie&#60;br /&#62;
&#60;a href=&#34;http://www.kcmhosting.com&#34; rel=&#34;nofollow&#34;&#62;http://www.kcmhosting.com&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>DaveVoss on "Thought I'd share: if a user needs to pick a Start Date and an End Date . . ."</title>
<link>https://www.machform.com/forums/topic/thought-id-share-if-a-user-needs-to-pick-a-start-date-and-future-end-date#post-17197</link>
<pubDate>Thu, 14 Feb 2013 06:45:09 +0000</pubDate>
<dc:creator>DaveVoss</dc:creator>
<guid isPermaLink="false">17197@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thanks so much for sharing a solution to a problem or a need!!  I like that communal support.
&#60;/p&#62;</description>
</item>
<item>
<title>Petermgr on "Thought I'd share: if a user needs to pick a Start Date and an End Date . . ."</title>
<link>https://www.machform.com/forums/topic/thought-id-share-if-a-user-needs-to-pick-a-start-date-and-future-end-date#post-17195</link>
<pubDate>Thu, 14 Feb 2013 05:52:02 +0000</pubDate>
<dc:creator>Petermgr</dc:creator>
<guid isPermaLink="false">17195@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I sent an email to support asking the question of how I can alert a user who fills out a Start Date and an End Date, when entering an End Date that falls before the Start Date.&#60;/p&#62;
&#60;p&#62;One of  my clients wanted to make sure that their staff could not have a form submitted if they made an error on the End Date entry.  They wanted to make sure the End Date was later than the Start Date.&#60;/p&#62;
&#60;p&#62;While waiting for my answer from support, I thought I'd experiment and I modified my post-functions.php (in the include folder) and added the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($form_id == 13688){
    if($input[&#38;#39;element_9_datepick&#38;#39;] &#38;gt; $input[&#38;#39;element_42_datepick&#38;#39;]){
    $process_result[&#38;#39;status&#38;#39;] = false;
    $process_result[&#38;#39;custom_error&#38;#39;] = &#38;#39;Your End date must be AFTER your start date!&#38;#39;;
    }
    }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I placed this directly over the following:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$element_child_lookup[&#38;#39;address&#38;#39;] 	 = 5;
		$element_child_lookup[&#38;#39;simple_name&#38;#39;] = 1;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The &#34;element_9_datepick&#34;  is my Start Date&#60;/p&#62;
&#60;p&#62;The &#34;element_42_datepick&#34; is my End Date&#60;/p&#62;
&#60;p&#62;The element number was retrieved by viewing the source of my form.&#60;/p&#62;
&#60;p&#62;Can't be sure if my code is as clean as it could be, but so far it works.&#60;/p&#62;
&#60;p&#62;Peter
&#60;/p&#62;</description>
</item>

</channel>
</rss>
