<?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: Select field  Required</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Select field  Required</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:59:40 +0000</pubDate>

<item>
<title>franki on "Select field  Required"</title>
<link>https://www.machform.com/forums/topic/select-field-required#post-3601</link>
<pubDate>Sat, 08 Nov 2008 20:43:29 +0000</pubDate>
<dc:creator>franki</dc:creator>
<guid isPermaLink="false">3601@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;That did it, thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Select field  Required"</title>
<link>https://www.machform.com/forums/topic/select-field-required#post-3600</link>
<pubDate>Sat, 08 Nov 2008 17:57:27 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">3600@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;You can modifiy &#34;includes/common-validator.php&#34; file to add some validation. I assume your &#34;please select&#34; text located on first value of &#34;Drop down element&#34;, so it will have value = &#34;1&#34;.&#60;/p&#62;
&#60;p&#62;Now search around line 30 ~ 39 on &#34;includes/common-validator.php&#34; file, you'll find these code : &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function validate_required($value){

	$value = $value[0]; 

	if(empty($value) &#38;#38;&#38;#38; (($value != 0) &#124;&#124; ($value != &#38;#39;0&#38;#39;)))  ){ //0  and &#38;#39;0&#38;#39; should not considered as empty
		return VAL_REQUIRED;
	}else{
		return true;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;replace with this one &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function validate_required($value){

	$value = $value[0]; 

	if((empty($value) &#38;#38;&#38;#38; (($value != 0) &#124;&#124; ($value != &#38;#39;0&#38;#39;))) &#124;&#124; ($value == &#38;#39;1&#38;#39;) ){ //0  and &#38;#39;0&#38;#39; should not considered as empty
		return VAL_REQUIRED;
	}else{
		return true;
	}
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>franki on "Select field  Required"</title>
<link>https://www.machform.com/forums/topic/select-field-required#post-3595</link>
<pubDate>Sat, 08 Nov 2008 12:03:01 +0000</pubDate>
<dc:creator>franki</dc:creator>
<guid isPermaLink="false">3595@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi Yuniar, I'll finish this post...&#60;br /&#62;
I'm in the same predicament. As you described, I have a drop down field which is populated with email addresses and is required. For my default I have &#34;Please select&#34;. If I submit the form with &#34;Please select&#34; in the field there are no indications that this field needs attention. It would be ideal if the form sees that this default text is not an email address and thus error.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Select field  Required"</title>
<link>https://www.machform.com/forums/topic/select-field-required#post-2254</link>
<pubDate>Fri, 04 Jul 2008 15:08:23 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">2254@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Let me clarify this.&#60;/p&#62;
&#60;p&#62;So you would like to have a select/drop down field, set as required and the default value is &#34;Please select&#34;, but client shouldn't be able to submit &#34;Please select&#34;. &#60;/p&#62;
&#60;p&#62;Am I correct?
&#60;/p&#62;</description>
</item>
<item>
<title>MikeBWD on "Select field  Required"</title>
<link>https://www.machform.com/forums/topic/select-field-required#post-2252</link>
<pubDate>Thu, 03 Jul 2008 20:37:49 +0000</pubDate>
<dc:creator>MikeBWD</dc:creator>
<guid isPermaLink="false">2252@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi All&#60;br /&#62;
By default you get (without setting default)&#60;br /&#62;
'&#38;lt;option value=&#34;&#34; selected=&#34;selected&#34;&#38;gt;&#38;lt;/option&#38;gt;'&#60;br /&#62;
and have an empty field just&#60;br /&#62;
change to:&#60;br /&#62;
'&#38;lt;option value=&#34;1&#34; selected=&#34;selected&#34;&#38;gt;Please select&#38;lt;/option&#38;gt;'&#60;br /&#62;
(by setting default) and client can submit the form with &#34;Please select&#34; selected &#60;/p&#62;
&#60;p&#62;is there a work around for this?&#60;br /&#62;
thanks Mike
&#60;/p&#62;</description>
</item>

</channel>
</rss>
