<?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: Disabling controls via code (visual basic 2003)</title><link>https://www.infopathdev.com:443/forums/thread/58361.aspx</link><pubDate>Thu, 26 Aug 2010 10:09:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58361</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58361.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58361</wfw:commentRss><description>&lt;p&gt;we can write conditional formatting to make fields read only. just use some conditional like &lt;/p&gt;
&lt;p&gt;if check_visibility is equal to yes&lt;/p&gt;
&lt;p&gt;set field read only&lt;/p&gt;
&lt;p&gt;on the click of the button set the value fo check_visibility field to yes&lt;/p&gt;</description></item><item><title>Re: Disabling controls via code (visual basic 2003)</title><link>https://www.infopathdev.com:443/forums/thread/58359.aspx</link><pubDate>Thu, 26 Aug 2010 06:51:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58359</guid><dc:creator>miggers2</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58359.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58359</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for the answers. I started making this form with Infopath 2007, where I could simple make a view read-only, which worked just perfectly. But as it turned out, I had to make it Infopath 2003 compatible, so the read-only option is out of question now.&lt;/p&gt;
&lt;p&gt;Anyways, is there a way then to make a view or controls read-only for example after the user has pressed a button, radio button or something? We tried this using code, but we only managed to make fields read-only, without any logic. So the form was unusable then.&lt;/p&gt;
&lt;p&gt;The other question is about the sections. I already use sections in my form. They&amp;#39;re used to hide/reveal question boxes, because we wanted the form to randomize for example 5&amp;nbsp;out of 10 questions. But what I don&amp;#39;t understand is that what do you mean with locking sections? In my Infopath, the section&amp;#39;s conditional formatting has only options to hide the sections, which is out of question.&lt;/p&gt;
&lt;p&gt;-Mikko&lt;/p&gt;</description></item><item><title>Re: Disabling controls via code (visual basic 2003)</title><link>https://www.infopathdev.com:443/forums/thread/58326.aspx</link><pubDate>Wed, 25 Aug 2010 14:28:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58326</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58326.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58326</wfw:commentRss><description>&lt;p&gt;What you&amp;#39;re describing isn&amp;#39;t possible.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I would suggest using a form design that uses a locked repeating section instead of a hardcoded layout and questions.&amp;nbsp; Then you&amp;#39;d only need to set conditional formatting on a few checkboxes.&lt;/p&gt;</description></item><item><title>Re: Disabling controls via code (visual basic 2003)</title><link>https://www.infopathdev.com:443/forums/thread/58322.aspx</link><pubDate>Wed, 25 Aug 2010 14:09:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58322</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58322.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58322</wfw:commentRss><description>&lt;p&gt;Hi Miggers, I don&amp;#39;t think it&amp;#39;s possible to modify by code your control. The easiest way is to set some conditionnal formatting.&lt;/p&gt;</description></item><item><title>Disabling controls via code (visual basic 2003)</title><link>https://www.infopathdev.com:443/forums/thread/58307.aspx</link><pubDate>Wed, 25 Aug 2010 10:24:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58307</guid><dc:creator>miggers2</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58307.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=58307</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have created a questionnaire, which works fine and all, but I&amp;#39;d like to make a little bit better.. Now, I have a long list of questions, and each questions have 4 possible answers, which are checkboxes. In the end of the questionnaire, I have a control (radio button), which disables all of the checkboxes, so that the people taking the questionnaire or the people going through the answers, can&amp;#39;t modify the answers after it has been submitted to Sharepoint. Now, I could go through all of them tens of checkboxes one by one with conditionnal formatting, but it goes without saying that it&amp;#39;s very tiresome and slow.&lt;/p&gt;
&lt;p&gt;Because of this, I&amp;#39;d like to write a piece of code (the form has visual basic 2003 compatible code, since it necessarily has to work with Infopath 2003), which could disable all the checkboxes if a certain control has a certain value.&lt;/p&gt;
&lt;p&gt;For example like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if control1 is set to &amp;quot;true&amp;quot;&lt;/p&gt;
&lt;p&gt;then disable each control starting with the name &amp;quot;checkbox1&amp;quot;, &amp;quot;checkbox2&amp;quot;, &amp;quot;checkbox3&amp;quot; etc&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is this possible to do?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;Mikko&lt;/p&gt;</description></item></channel></rss>