Getting a button to diabled or make other controls read only when the button is clicked. - InfoPath Dev
in

InfoPath Dev

Getting a button to diabled or make other controls read only when the button is clicked.

Last post 02-18-2009 09:14 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-09-2009 12:44 PM

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Getting a button to diabled or make other controls read only when the button is clicked.

    Getting a button to disable or make other controls read only when the button is clicked. Also, when clicked I like the button to disable itself as well, so can't know one change or click anything on one half of the form. Please help. If I can do the without the VSTA, that would be great.

  • 02-09-2009 10:30 PM In reply to

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

    Hi,

    You can do this using rules and conditional formatting.

    1. Add a Boolean field with default value set to false to the schema.

    2. Add a rule to the button to set the Boolean field to True.

    3. Add a conditional formatting to the button as if Boolean field value is equal to true then disable the button.

    4. Add the same conditional formatting for the fields to hide/ make read only.

     

    Swathip
    www.ggktech.com
  • 02-11-2009 06:16 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

    swathip,

    Can you elaborate for step 3. If I am in the rule section I only see a action that I can add. Can you just speak a little more detail on step 3. Thanks. 

     

  • 02-11-2009 11:32 AM In reply to

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

    Conditional formatting is not in the rules section. If you are in the button properties, I think it is under the 'Display' tab. So you use rules to set a field's value, then you base conditional formatting off that field's value....

    Hilary Stoupa

  • 02-12-2009 07:48 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

     

    So I disable the Contact Selector, based on the Rules of another control?
  • 02-12-2009 09:03 AM In reply to

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

    Here are the steps you will take:

    Control A is a text box and Control B is a button. Your scenario is that you only want to have the button display when there is text in the text box. Double click on the button and select the Display tab --> Conditional formatting. Click the Add button and in the first condition, select the field name for your text box (Control A). In this case, your condition will be “is blank” and then select “Hide this control” or “Disable this control.” When you preview your form, it will not display the button unless you place text in the text box.

    Janice Thorne Microsoft Certified Professional

    Qdabra / Streamline data gathering to turn process into knowledge
  • 02-12-2009 12:14 PM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

     

    Thanks for the advice but the contact selector is a different animal.
  • 02-18-2009 09:14 AM In reply to

    Re: Getting a button to diabled or make other controls read only when the button is clicked.

    Do you have to disable it? Can you hide it instead? If so, you could put it in a section and use conditional formatting to hide the section....

    Hilary Stoupa

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.