<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to set the read-only attribute of a certain field from the code behind</title><link>https://www.infopathdev.com:443/forums/thread/24983.aspx</link><pubDate>Fri, 07 Dec 2007 10:07:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24983</guid><dc:creator>jaumedejuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24983.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24983</wfw:commentRss><description>&lt;p&gt;I am using Infopath 2007 but as you point out &amp;quot;views&amp;quot; do not seem to be the solution, since they only allow to change the read-only status of the full form instead of just some specific fields.&lt;/p&gt;&lt;p&gt;I&amp;#39;ve been considering the flags system that you mention but I have not really seen an actual mechanism within Infopath that allows to do such a thing.&lt;br /&gt;That got me thinking and I understood that I could set a field as that status flag, with values such as {1,2,3,4} and than add the very same conditional rule to each field, which would call a method that&amp;#39;ll retrieve the status that applies.&lt;/p&gt;&lt;p&gt;I guess that could work better and clear out the code since all the calls from within the form will be exactly the same ones.&amp;nbsp;&lt;/p&gt;&lt;p&gt;And with this bit I am kind of lost  &lt;br /&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Clay Fox:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I believe in code you have to use the syntax &amp;nbsp;true() to set an attribute value.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Do you mean that it is actually possible to set the value of the read-only attribute? what would be the method/call like?&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Clay Fox:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Hope this helps.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;very helpful indeed&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to set the read-only attribute of a certain field from the code behind</title><link>https://www.infopathdev.com:443/forums/thread/24974.aspx</link><pubDate>Thu, 06 Dec 2007 22:28:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24974</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24974.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24974</wfw:commentRss><description>&lt;p&gt;Typically what I do is have read-only views and edit views.&amp;nbsp;Then you can use conditions to pick the view. Since you have multiple sections and levels or read-only their may not be anyway around it. In that scenario, if you have say four different levels of user then you create a flag field that will have 1 through four.&amp;nbsp; When the form opens you determine the user and scenario and set the flag to 1 through 4. Then all of your other rules are built off of what the flag value is.&amp;nbsp; That is usually the simplest way to handle lots of rule checks like this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you are using Infopath 2007 you can make a view read-only with one click in view properties.&amp;nbsp;Create the edit view and then just copy it and mark the second read-only.&lt;/p&gt;
&lt;p&gt;I believe in code you have to use the syntax &amp;nbsp;true() to set an attribute value.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;</description></item><item><title>How to set the read-only attribute of a certain field from the code behind</title><link>https://www.infopathdev.com:443/forums/thread/24965.aspx</link><pubDate>Thu, 06 Dec 2007 16:18:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24965</guid><dc:creator>jaumedejuan</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24965.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=24965</wfw:commentRss><description>&lt;p&gt;Hi all,&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am still in my first Infopath days and I would like to share this issue with you.&lt;br /&gt;I have a form that is divided in three different sections that will automatically set their fields to read-only, depending on a combination of the current user and other fields that may have been filled in previously.&lt;/p&gt;&lt;p&gt;So far this is working but I have had to add a pretty big number of &amp;quot;conditional formatting&amp;quot; rules that will make the form not particularly easy to maintain.&lt;br /&gt;What I would like to do is to control what controls are set to read only from the code behind itself. &lt;/p&gt;&lt;p&gt;I&amp;#39;ve seen that I can access the XML nodes via &lt;/p&gt;&lt;p&gt;&amp;nbsp;XPathNavigator MainDataSource.SelectSingleNode(path,NamespaceManager);&lt;/p&gt;&lt;p&gt;And that&amp;#39;s fine, I&amp;#39;ve been reading/writing their values with no further issues, but still I have not found out how can I set the value of the read-only attribute to &amp;quot;true&amp;quot;.&lt;/p&gt;&lt;p&gt;Could you please let me know how could I get this done? &lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks a lot,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Jaume &lt;br /&gt;&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;</description></item></channel></rss>