Button not showing disabled - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Button not showing disabled

Last post 11-01-2017 04:41 AM by klink. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • 08-30-2016 06:01 AM

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Button not showing disabled

    The facts: 

    • We are moving one of our site collections from SP 2010 to SP 2013. 
    • I am in charge of converting the forms (InfoPath 2010).
    • Forms are being saved as Content Types.

    No problems.  They work great.  However, here is my problem. 

    • I have rules to disable a submit button at the bottom of the form if all of the required fields aren't filled.  The button does not show as being disabled (although it actually is!).

    I first chalked this up to SP 2013, but then I converted a form that had two different views.  The button on the second view button showed disabled!  WHAT THE HECK????

    To make sure it wasn't because I was converting forms, I created a whole new VERY SIMPLE form (attached). 

    • The first button should be disabled when "TestField" is blank.
    • The second button changes the view to the exact same view.
    • When I open the form, the "Disabled Button" is disabled, but you can't tell that it is.
    • When I click on the "Change View" button, the "Disabled Button" now shows as disabled.

    ARGH!

    I'm attaching screen prints so you can see the problem.  Any help here would be GREATLY APPRECIATED!!!!

    THANKS! 

     


  • 08-30-2016 06:02 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

     And here is the form...

  • 08-30-2016 05:46 PM In reply to

    Re: Button not showing disabled

    This all sounds weirdly familiar - except I think I have never gotten disabled buttons in browser 2013 forms to actually appear disabled. In one set of SHP 2013 forms I worked on, we simply have a button and an expression box that looks exactly like the disabled button should look. Hide the button if the button should be disabled. Hide the expression box if the button should be enabled. Silly, but it works. We added a field to the main data source (not on the form) with a default value that calculates the conditions that should hide the button (called it DisableSubmit) and toggled the logic off that to make it easier if we needed to make changes down the road (so we didn't have to update multiple rulesets, I'm lazy like that).
    Hilary Stoupa

  • 08-31-2016 05:54 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Thanks, Hilary!  I understand what you are saying, except what is an Expression Box?  =(

    Also, I had tried hiding the button, but when it was unhidden, it looked like this:

      


  • 07-19-2017 05:39 AM In reply to

    Re: Button not showing disabled

    Glad I found this and that I'm not crazy. I've been converting forms to 2013 as well, and I've been coming across this. I have one that even shows up as half a button that you can't actually see. I've used a cell in a table formatted to look like a button for an external hyperlink before, but I'll have to try the expression box. For klink, this is what I found: Calculated Value. Formerly known as an Expression Box, this control is very similar to a read-only text box and is good for displaying values or calculations in a way that looks like normal text. Hilary, I'm also very interested in using the field to create the list of validations. I have some fairly complex forms and the rulesets are heinous to manage. Anything that can make this easier for me would be extremely helpful, so if you could share any additional info on how that is accomplished I would be grateful. I have a lot of conditional rules, though, so I'm not sure how those can all be put into one list unless it's a complex list of (this = this and this = this) or (that = that and that=that), etc, as an example. I do that somewhat using expressions to get by the five rule limit.
  • 07-19-2017 07:47 AM In reply to

    Re: Button not showing disabled

    Hi! I'm sorry, I'm confused again. :) Can you tell me what you need help with when you say "using the field to create the list of validations"?
    Hilary Stoupa

  • 07-19-2017 08:14 AM In reply to

    Re: Button not showing disabled

    Hilary Stoupa:
    We added a field to the main data source (not on the form) with a default value that calculates the conditions that should hide the button (called it DisableSubmit) and toggled the logic off that to make it easier if we needed to make changes down the road (so we didn't have to update multiple rulesets, I'm lazy like that).
    This particular item. I was wondering if you could give me an example of what you set the default value to in order to do form validations via default value rather than multiple rulesets.
  • 07-19-2017 08:20 AM In reply to

    Oh! Got it. So, what I do is add a text field to the main data source - usually in a group called FormLogic or something (I like to keep my schema organized). It doesn't need to be on the form. Then, you can set its default to calculate true or false. I'm attaching a simple sample for you to look at - save it locally, right click and select Design. You can get pretty sophisticated in the default value, and it makes it easy to find / change the logic that disables your button (or other thing...)
    Hilary Stoupa

  • 07-19-2017 10:03 AM In reply to

    Re: Button not showing disabled

    Thank you! This is exactly what I was looking for. Now if only my buttons actually looked disabled when they were supposed to. :) I did see this happen on SP 2010, so I don't think it's 100% tied to SP 2013.
  • 07-19-2017 10:37 AM In reply to

    Oh, forgot to include that! See attached. My button and my "button" are kinda ugly, but you can adjust the formatting in your form - by switching to a calc'd value for your disabled button, you don't get highlighting on hover, etc - all the stuff that makes us think a button is live.
    Hilary Stoupa

  • 10-23-2017 08:04 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Hi, Hilary!  I created a fake button and it works great, EXCEPT tabbing to it.  It doesn't.  I have fields the user has to initial.  They tab through those fields, and then after the last one, they should tab to the button.  But it seems that InfoPath doesn't "see" it until after they tab, so the cursor goes to the top of the page.  (Actually, the cursor goes to the web address when in the browser).

    To see what I mean, I changed your sample form to show the submit button when the formula is true instead of false.  If you put "d" in field3 and "h" in field4, and then tab, it takes you to field1.  =(

     Any way around this? 

     

    THANKS! 

     

  • 10-23-2017 08:23 AM In reply to

    Re: Button not showing disabled

    Unfortunately, probably not - because the button doesn't show until the data is entered into field 4, which means tabbing out of field 4. So - you tab out of field 4, which triggers the formatting, which displays the data .... by that point you are already back at field 1.
    Hilary Stoupa

  • 10-23-2017 08:29 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Button not showing disabled

    Is there any way to put some sort of "hidden" field to tab to so it at least doesn't go clear to the top?  The user won't approve it as is.  =(

    THANKS! 

  • 10-23-2017 08:37 AM In reply to

    Re: Button not showing disabled

    Yeah, before I replied, I tried that - both with a field and with a button - had the same outcome with both.... Can the form be rearranged so that the fields required for enabling the button are higher in the form, and some that the formatting don't rely on are after them?
    Hilary Stoupa

  • 10-23-2017 09:13 AM In reply to

    • klink
    • Top 100 Contributor
    • Joined on 09-15-2014
    • Posts 99

    Re: Button not showing disabled

    Unfortunately, no.  It's an agreement form, and they just have to initial everything and then click on the "I Agree" button. 

    I have another form like this, except instead of initialing a box, the user clicks a Yes/No radio button.  That seems to work better because the are less likely to tab.  I'm going to see what the user thinks about that idea.

    If you think of anything else, let me know.

    Thanks for your help! 

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