<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: hide/disable button if validation errors?</title><link>https://www.infopathdev.com:443/forums/thread/44314.aspx</link><pubDate>Tue, 14 Jul 2009 16:46:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44314</guid><dc:creator>krishna</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44314.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=44314</wfw:commentRss><description>&lt;p&gt;Hi Swathi,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;tried following this example, but somehow I am not able to set the field a value.&amp;nbsp;Here is the code I am using for the field.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;function msoxd_my_field1::OnAfterChange(eventObj) {&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;if (eventObj.IsUndoRedo)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;{ If (thisXDocument.Errors.count = 0) &lt;/p&gt;
&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;//my:dummy&amp;quot;).text = &amp;quot;TRUE&amp;quot; &lt;/p&gt;
&lt;p&gt;return; } &lt;/p&gt;
&lt;p&gt;And then I created dummy hidden field on the form and I am using conditional formatting on the form to disable it if dummy field is set to FALSE.&lt;/p&gt;
&lt;p&gt;Am I missing something here? Please help. &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: hide/disable button if validation errors?</title><link>https://www.infopathdev.com:443/forums/thread/41765.aspx</link><pubDate>Fri, 15 May 2009 14:14:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41765</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41765.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=41765</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Add a boolean secondary field with default value false. For each and every field in the form add an on after change event, and verify whether there are any errors in the form (thisXDocument.Errors.count &amp;gt; 0). If there are errors then set that field value to true. Add a conditional formatting to the button to hide/disable using this field. Also check this condition (thisXDocument.Errors.count &amp;gt; 0) in form onload and set the field value accordingly.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>hide/disable button if validation errors?</title><link>https://www.infopathdev.com:443/forums/thread/41764.aspx</link><pubDate>Fri, 15 May 2009 13:35:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:41764</guid><dc:creator>CraigW</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/41764.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=41764</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a form with a button.&amp;nbsp; The button has rules that submit to the environment and close the form.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;If the form has validation errors and the user clicks the button, a rather incomprehensible message is shown such as:&lt;/p&gt;
&lt;table class="" cellspacing="0"&gt;

&lt;tr&gt;
&lt;td class=""&gt;
&lt;p&gt;=====================&amp;nbsp;&lt;br /&gt;Some rules were not applied.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;
&lt;p&gt;Click &lt;b&gt;Continue&lt;/b&gt; to resume filling out the form. You may want to check your form data for errors.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;
&lt;p&gt;Click &lt;b&gt;Start Over&lt;/b&gt; to load a new copy of the form.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;table class="" cellspacing="0"&gt;

&lt;tr&gt;
&lt;td class=""&gt;
&lt;p&gt;&lt;a href="https://sdsnumbers.skillsdevelopmentscotland.co.uk/forms/invoices/_layouts/WrkTaskIP.aspx?List=e3f5a46f%2D9701%2D45cf%2D9fc7%2D7b8739480936&amp;amp;ID=87&amp;amp;Source=https%3A%2F%2Fsdsnumbers%2Eskillsdevelopmentscotland%2Eco%2Euk%2Fforms%2Finvoices%2FLists%2FTasks%2Factive%2Easpx#"&gt;Hide error details&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;
&lt;p&gt;The form cannot be submitted because it contains validation errors. Errors are marked with either a red asterisk (required fields) or a red, dashed border (invalid values).&lt;br /&gt;&lt;br /&gt;Field or group: my:Comments &lt;br /&gt;Error: Error &lt;br /&gt;=====================&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;A user is going to have no idea what is going on, what they did that is wrong and whether they should continue or start over.&lt;/p&gt;
&lt;p&gt;So, how can I hide or disable the button if there are validation errors?&amp;nbsp; I don&amp;#39;t want to have to implement all validation twice..once against the elements and again against the button!&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Craig&lt;/p&gt;</description></item></channel></rss>