<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Displaying something on click?</title><link>https://www.infopathdev.com:443/forums/thread/35800.aspx</link><pubDate>Tue, 16 Dec 2008 10:40:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35800</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35800.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35800</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Add a string field (field2) to the schema with the default value to 0. Add a text field to the schema and UI. Add a conditional formatting to this text field as if the field2 is not equal to 1 then hide the control. Now add the following code in the on context change event.&lt;/p&gt;
&lt;p&gt;InfoPathEventHandler(EventType = InfoPathEventType.OnContextChange)]&lt;/p&gt;
&lt;p&gt;public void FormEvents_OnContextChange(DocContextChangeEvent e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;if (e.Context.nodeName == &amp;quot;my:field1&amp;quot;)&lt;/p&gt;
&lt;p&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;thisXDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:field2&amp;quot;).text = &amp;quot;1&amp;quot;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;if (e.Type == &amp;quot;ContextNode&amp;quot;)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;// The XML selection or context has changed.&lt;/p&gt;
&lt;p&gt;// Write your code here.&lt;/p&gt;
&lt;p&gt;return;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here field1 -&amp;gt; first text box&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Displaying something on click?</title><link>https://www.infopathdev.com:443/forums/thread/35798.aspx</link><pubDate>Tue, 16 Dec 2008 10:14:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35798</guid><dc:creator>smods</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35798.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35798</wfw:commentRss><description>&lt;p&gt;Do you guys know if there is a way to display a text box once the user clicks on a certain other text field?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I.e. they click&amp;nbsp;in the field&amp;nbsp;&amp;quot;Name&amp;quot; and it brings up a text box&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Cheers&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>