Font color on disabled controls - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Font color on disabled controls

Last post 04-15-2016 10:59 AM by Hilary Stoupa. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 08-27-2009 01:59 PM

    • bella
    • Not Ranked
    • Joined on 08-01-2009
    • Posts 9

    Font color on disabled controls

    HI,

    I am using InfoPath 2003 and have a form with mulitple drop down lists.  Because I dont want users who are filling out this form to mess with the dropdown lists, I have conditionally formatted them to be disabled by the 'user role'.  However, when I do that, the font changes to grey and it is quite difficult to read.  Is there a way to make that font color black so it is more readable?

    thanks for you time,

    Bella 

  • 08-27-2009 02:43 PM In reply to

    Re: Font color on disabled controls

    Hi--

    Instead of disabling the control, you could hide it completely using conditional formatting and also have an expression box on the form bound to the same field. Use the opposite condition to hide the expression box. So, for example, if your user role called 'Admin' can use the drop down, you'd format that to hide if the user isn't in the Admin role. You'd have an expression box formatted to hide if the user IS in the Admin role... make sense? Then you can put a border around the expression box to make it look like a control, if you want, or color the font whatever you'd like...

    Hilary Stoupa

  • 08-27-2009 03:43 PM In reply to

    • bella
    • Not Ranked
    • Joined on 08-01-2009
    • Posts 9

    Re: Font color on disabled controls

    Great idea Hilary!  I have not used expression boxes before and they are pretty cool.  However, I have encountered one minor issue that I can work around unless you have an easy resolution to...

    When I create a expression box for one of the drop down lists, the value that displays in the expression box is the actual 'value' not the 'Display Name'.  So for example, I have a drop down list of 'Values' 0- 1 - 2 that represent (in review, released, complete), however the expression box is displaying '0' instead of 'in review'.   The work around that I see is to make the value = display name.  Is there another way to have it display the 'display name'. 

    Thanks a bunch for responding as quickly as you did!

    Bella

  • 08-27-2009 04:11 PM In reply to

    Re: Font color on disabled controls

    Yes, that is a downfall. Is your drop down populated manually? Or does it use a seconday data source? If it uses a secondary data source, you could select the field from the 2ds, and filter it so that you get the data field that matches the display with the related selected value in your drop down. If your drop down is populated manually, I don't know of a good way to do this -- there is a way to create a type of conditional default value, but the formula gets pretty complex...

    Hilary Stoupa

  • 08-28-2009 11:20 PM In reply to

    • bella
    • Not Ranked
    • Joined on 08-01-2009
    • Posts 9

    Re: Font color on disabled controls

    Hi Hilary,

    Through trial and error and combining multiple posts together on this subject, I actually managed to create the formula to work with the drop down lists that use a secondary source...and it worked!  Yeh!!!!

    As for the manually populated ddl, I guess I will just retype the Value to equal the Display Name.  Thanks for your suggestions, they all worked like a charm.

    bella 

  • 04-13-2016 12:08 PM In reply to

    • nkidd
    • Not Ranked
    • Joined on 04-13-2016
    • Posts 6

    Re: Font color on disabled controls

    I was wondering - since this post is almost 7 years old, is there any new ways on how to do this? I have a similar problem as the original post - i have an InfoPath form in which a certain view i want to have a dropdown list "read only", but i do not want it to turn grey. Other than your suggestions from years ago, is there a way to do this now? Thanks
  • 04-13-2016 12:28 PM In reply to

    Re: Font color on disabled controls

    Hi! I'm sorry to tell you - but no. If you disable a drop down, it becomes hard to read. Can you just use a calculated value in that view instead?
    Hilary Stoupa

  • 04-13-2016 12:37 PM In reply to

    • nkidd
    • Not Ranked
    • Joined on 04-13-2016
    • Posts 6

    Re: Font color on disabled controls

    I'm not sure. I do have the same issue as the original poster as well, where I want it to show the "display" name and not the "value". Would a calculated field allow for that? or is the only way to show the Display name by using the dropdown control? If I had to, i could make the display and value match, however i'd rather not (the values are all email addresses and the display are just names which looks much nicer in the form, but i need the email address as the value to be used in sharepoint workflows).
  • 04-13-2016 12:42 PM In reply to

    Re: Font color on disabled controls

    Are your dropdown options hardcoded in the control? Or are they in a secondary data source?
    Hilary Stoupa

  • 04-13-2016 12:48 PM In reply to

    • nkidd
    • Not Ranked
    • Joined on 04-13-2016
    • Posts 6

    Re: Font color on disabled controls

    I have the options set in the control
  • 04-13-2016 02:55 PM In reply to

    Re: Font color on disabled controls

    That makes it a little harder. How many items are there? You could create an XML file for them, then you'd be able to use a calculated value - I'll set up a sample later today or sometime tomorrow and attach it to a reply so you can see what I mean.
    Hilary Stoupa

  • 04-13-2016 03:49 PM In reply to

    Re: Font color on disabled controls

    Save the attached file locally. Right click and select Design to open in design mode. I've added an XML file as a resource (Data tab, Resource files) and added a data connection to it. Then I've used it as the data source for my dropdown, so in the second view it is easy to add a calc'd value that displays the "display" value.
    Hilary Stoupa

  • 04-14-2016 12:15 PM In reply to

    • nkidd
    • Not Ranked
    • Joined on 04-13-2016
    • Posts 6

    Re: Font color on disabled controls

    Well, i thought i had it, but when i tried to publish the form to SharePoint, i got a message - "Binding a non-repeating control to a repeating field or group is not supported in InfoPath 2010 Web browser forms...". Any idea if i did something wrong or if what I am doing wont work in SharePoint? I am pretty sure I matched everything you did on your example to my form with the data source, etc but may have messed something up...i appreciate your help very much
  • 04-14-2016 03:44 PM In reply to

    Re: Font color on disabled controls

    This is an InfoPath issue: http://www.infopathdev.com/blogs/hilary/archive/2012/01/19/ipfs-design-checker-errors-amp-print-preview.aspx If you need a hand fixing up the view, attach your template to a reply under Options and I can give you a hand tomorrow - apparently you can also recreate the control to get around this: http://www.infopathdev.com/blogs/mel_balsamo/archive/2013/01/14/get-rid-of-that-quot-control-binding-is-not-supported-quot-error-on-your-design-checker.aspx
    Hilary Stoupa

  • 04-15-2016 09:34 AM In reply to

    • nkidd
    • Not Ranked
    • Joined on 04-13-2016
    • Posts 6

    Re: Font color on disabled controls

    Here is my template. Thank you very much for your help - i really appreciate it. Just a quick overview - the "AllOpen" view is the default view which will be used to create the SharePoint item initially. All fields should be active. The ChangeStatus view will have all fields except for Status disabled - so they can be seen but not changed. In the end, i would like the 2 views to look identical - except you can edit the info in one view and "read only" in the other. Thanks again. For some reason, my firewall is blocking me from attaching the file to this post. I uploaded the file to Dropbox...hopefully you can get it here. https://www.dropbox.com/s/uqsohs5a0jj2ah1/UAMForm.xsn?dl=0 thanks again
Page 1 of 2 (18 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.