<?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: Input Validation</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Input Validation</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 00:10:09 +0000</pubDate>

<item>
<title>christopherbrooks on "Input Validation"</title>
<link>https://www.machform.com/forums/topic/input-validation#post-12852</link>
<pubDate>Tue, 01 Nov 2011 04:28:16 +0000</pubDate>
<dc:creator>christopherbrooks</dc:creator>
<guid isPermaLink="false">12852@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Got it! needed to use $error_elements[$element_id] rather than $error_elements[$element_data]
&#60;/p&#62;</description>
</item>
<item>
<title>christopherbrooks on "Input Validation"</title>
<link>https://www.machform.com/forums/topic/input-validation#post-12851</link>
<pubDate>Tue, 01 Nov 2011 04:24:09 +0000</pubDate>
<dc:creator>christopherbrooks</dc:creator>
<guid isPermaLink="false">12851@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;With some adjustment I am able to correctly test whether the drop down selection was the default (--Please select-- ) or something else. If default, you get an error when trying to continue, and if not, no error. However, the error is showing up on the last field of the form, not the field with the drop down default. So some further adjustment is apparently needed to get the error message to position on the correct field.
&#60;/p&#62;</description>
</item>
<item>
<title>christopherbrooks on "Input Validation"</title>
<link>https://www.machform.com/forums/topic/input-validation#post-12849</link>
<pubDate>Tue, 01 Nov 2011 00:39:13 +0000</pubDate>
<dc:creator>christopherbrooks</dc:creator>
<guid isPermaLink="false">12849@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Thank you for the suggestion. Can you clarify, I do not understand what you mean by:&#60;br /&#62;
change and in those code with backticks
&#60;/p&#62;</description>
</item>
<item>
<title>redityo on "Input Validation"</title>
<link>https://www.machform.com/forums/topic/input-validation#post-12846</link>
<pubDate>Mon, 31 Oct 2011 06:22:19 +0000</pubDate>
<dc:creator>redityo</dc:creator>
<guid isPermaLink="false">12846@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;This possible with small customization, edit your &#34;includes/post-functions.php&#34; file and go to around line 661 ~ 663 for these code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if($validation_result !== true){
	$error_elements[$element_data] = $validation_result;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;then put these code bellow those line&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$query = &#38;quot;select &#38;lt;code&#38;gt;option&#38;lt;/code&#38;gt; from &#38;lt;code&#38;gt;ap_element_options&#38;lt;/code&#38;gt; where form_id=&#38;#39;$form_id&#38;#39; and option_id = &#38;#39;$element_data&#38;#39; and element_id = &#38;#39;$element_id&#38;#39; &#38;quot;;
$result = do_query($query);
$row = do_fetch_result($result);

if ($row[&#38;#39;option&#38;#39;] == &#38;quot;--select ...--&#38;quot;) {
	$error_elements[$element_data] = &#38;quot;You need to select another options&#38;quot;;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;make sure the option text is same with the one on your drop down (case sensitive)&#60;/p&#62;
&#60;p&#62;PS : change &#60;code&#62; and &#60;/code&#62; in those code with backticks
&#60;/p&#62;</description>
</item>
<item>
<title>christopherbrooks on "Input Validation"</title>
<link>https://www.machform.com/forums/topic/input-validation#post-12844</link>
<pubDate>Sun, 30 Oct 2011 19:08:33 +0000</pubDate>
<dc:creator>christopherbrooks</dc:creator>
<guid isPermaLink="false">12844@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Is it possible to add validation for a dropdown element, such that the default choice (eg, --select ...--) is NOT valid, but any other choice is valid? I want to force the user to make a selection.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
