<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Data Validation on Submit</title><link>https://www.infopathdev.com:443/forums/thread/63306.aspx</link><pubDate>Tue, 18 Jan 2011 17:00:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:63306</guid><dc:creator>Kolten</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/63306.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=63306</wfw:commentRss><description>I have two sections: one that the user sees and fills out information, and one that is the &amp;#39;submit&amp;#39; section - very basic info.  These two sections are shown/hidden depending on the value of the &amp;quot;SubmitView&amp;quot; variable.


When submitting, if a user has some validation errors, the content switches to this &amp;#39;basic submit&amp;#39; section because of a rule I have on the submit button:


Set fields value: @SubmitView = &amp;#39;1&amp;#39;

Submit using a data connection: Main Submit

Set a fields value: @submitview = &amp;#39;0&amp;#39;

Close this form: no prompt


Sections are shown/hidden depending on the variable SubmitView above.


So what occurs when the user submits a form with validation errors is the form switches off the input section, shows the submit section (for email purposes) tells them to &amp;#39;cancel&amp;#39; or &amp;#39;continue&amp;#39;, but doesn&amp;#39;t switch the view back. This is a problem because the &amp;#39;basic submit&amp;#39; section isn&amp;#39;t the way the user is supposed to enter information. I need to switch the content sections to display the user-friendly version instead (hence the @submitview = &amp;#39;0&amp;#39; above). It isn&amp;#39;t catching this bit of code because the code validation stops the submission process, and the rule is cancelled. How can I ensure that the proper section is displayed upon submit when there are validation errors?


Thanks,</description></item></channel></rss>