Hide controls via Javascript (not the IDE) - InfoPath Dev
in

InfoPath Dev

Hide controls via Javascript (not the IDE)

Last post 10-17-2006 12:21 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-16-2006 12:19 PM

    • Eric
    • Not Ranked
    • Joined on 10-10-2006
    • Posts 24

    Hide controls via Javascript (not the IDE)

    Hello,

    Has anyone used Javascript to hide or show controls on a form?

    I'd like to have a little function that loops through a set of controls and sets the visibility based on some set of criteria I have.

    I'd prefer not to have to interact with the IDE and set rules on a view by view and control by control basis.

    Thanks,

    -Eric
  • 10-17-2006 12:21 AM In reply to

    Re: Hide controls via Javascript (not the IDE)

    Hey Eric,

    Unfortunately InfoPath does not directly expose the control properties to any programming languages. The only way to accomplish what you are doing is to have a secondary data source with boolean fields for each of the controls that you wish to change the visibility for. Using conditional formatting that references the nodes on the 2DS you can then set the values in the 2DS to true/false depending on whether you want to show or hide the nodes. This has been discussed in the forums several times before if you want to search for more info.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.