<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Using VBscript to set a control to be required or not required</title><link>https://www.infopathdev.com:443/forums/thread/54545.aspx</link><pubDate>Wed, 05 May 2010 15:05:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54545</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54545.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54545</wfw:commentRss><description>&lt;p&gt;use data validations for that &lt;/p&gt;
&lt;p&gt;suppose u have two fields&lt;/p&gt;
&lt;p&gt;field1 &lt;/p&gt;
&lt;p&gt;field2 &lt;/p&gt;
&lt;p&gt;field2 is required only if field one has &amp;quot;yes&amp;quot; value.&lt;/p&gt;
&lt;p&gt;on field2 rightclick and click data validation -&amp;gt; Add&lt;/p&gt;
&lt;p&gt;field1 is equal to Yes&amp;nbsp; and&lt;/p&gt;
&lt;p&gt;field2 is blank&lt;/p&gt;
&lt;p&gt;then enter the tip .. and click ok &lt;/p&gt;
&lt;p&gt;now this field will be required if field1 = Yes &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Using VBscript to set a control to be required or not required</title><link>https://www.infopathdev.com:443/forums/thread/54540.aspx</link><pubDate>Wed, 05 May 2010 13:58:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54540</guid><dc:creator>martinpalmer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54540.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54540</wfw:commentRss><description>&lt;p&gt;How do I make controls required only if a radio button a control is a certain value? &amp;nbsp;I know I can do this based on the OnAfterChange, just not sure what the code would be.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just to rephrase - &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Is there a programatic way (Vbscript) to set the attribute (Can Not Be Blank) for a control?&lt;/p&gt;
&lt;p&gt;example:&lt;/p&gt;
&lt;p&gt;if (XDocument.DOM.selectSingleNode(&amp;quot;//my:err_user_catagory&amp;quot;).text = &amp;quot;False&amp;quot;) then XDocument.DOM.selectSingleNode(&amp;quot;//my:NumberUsers&amp;quot;)..... (set this field to Can Not Be Blank)&lt;/p&gt;</description></item></channel></rss>