<?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>Re: Issues when people click on 'Cancel' on the email submit box</title><link>https://www.infopathdev.com:443/forums/thread/37583.aspx</link><pubDate>Fri, 23 Jan 2009 12:43:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37583</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37583.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=37583</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can do this using code.&lt;/p&gt;
&lt;p&gt;public bool SubmitToEmail(string emailAdapterName, string to, string cc, string subject, string intro)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;try&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;thisXDocument.Errors.DeleteAll();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;EmailAdapter email = (EmailAdapter)thisXDocument.DataAdapters[emailAdapterName];&lt;/p&gt;
&lt;p&gt;&amp;nbsp;email.To = to;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;email.CC =cc;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;email.Subject = subject;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;email.Intro = intro;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;email.Submit();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;return true;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;catch (Exception ex)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp; string sMessage = FAILED_UNKNOWN;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; return false;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the button onlcick event write the following code.&lt;/p&gt;
&lt;p&gt;If(SubmitToEmail(&amp;quot;emailAdapterName,&amp;quot;to value&amp;quot;,&amp;quot;cc value&amp;quot;,&amp;quot;subject&amp;quot;, &amp;quot;introduction&amp;quot;))&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;thisXDocument.DOM.selectSingleNode(&amp;lt;status field xpath&amp;gt;).text = &amp;quot;status value&amp;quot;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>Re: Issues when people click on 'Cancel' on the email submit box</title><link>https://www.infopathdev.com:443/forums/thread/37446.aspx</link><pubDate>Wed, 21 Jan 2009 11:29:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37446</guid><dc:creator>jtownson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37446.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=37446</wfw:commentRss><description>&lt;p&gt;Thanks but that won&amp;#39;t work how i need it to work.&amp;nbsp; I need the recipient of the form to be able to see those hidden fields.&amp;nbsp; In the method&amp;nbsp;above the status will be the same on the attachement that is being sent, hence not being able to see those hidden fields.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Issues when people click on 'Cancel' on the email submit box</title><link>https://www.infopathdev.com:443/forums/thread/37444.aspx</link><pubDate>Wed, 21 Jan 2009 10:55:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37444</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37444.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=37444</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You need to change order of your Rules. First should be Email Submit and second one should be Status.&lt;/p&gt;
&lt;p&gt;In this way status will not be changed if you cancel the email also. And also your hidden sections will not be displayed.&lt;/p&gt;
&lt;p&gt;I hope this will help you.&lt;/p&gt;</description></item><item><title>Issues when people click on 'Cancel' on the email submit box</title><link>https://www.infopathdev.com:443/forums/thread/37442.aspx</link><pubDate>Wed, 21 Jan 2009 10:30:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37442</guid><dc:creator>jtownson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37442.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=37442</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I have a submit button on a form using the &amp;quot;submit&amp;quot; action&amp;nbsp;but with custom rules.&amp;nbsp; I have one rule setup with 2 steps.&amp;nbsp; First step changes a &amp;quot;status&amp;quot; field&amp;nbsp;and the second step submits via email.&amp;nbsp; When the status&amp;nbsp;is changed&amp;nbsp;i have&amp;nbsp;set it up to&amp;nbsp;show&amp;nbsp;some hidden sections that i don&amp;#39;t want the&amp;nbsp;person who is submitting the form to see.&amp;nbsp;&amp;nbsp; All works ok apart from if the submitter clicks on &amp;#39;Cancel&amp;#39; on the email dialog then they return to the form with the status change and thus seeing the hidden section.&amp;nbsp; Is there a way round this? - ie if a user clicks on cancel then another rule fires changing the status back??&amp;nbsp; I have tried adding this rule after the submit and it dosen&amp;#39;t fire.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;all&lt;/p&gt;
&lt;p&gt;J&lt;/p&gt;
&lt;p&gt;(PS user roles aren&amp;#39;t an option, and i am using Infopath2003)&lt;/p&gt;</description></item></channel></rss>