Hiding a picture programatically - InfoPath Dev
in

InfoPath Dev

Hiding a picture programatically

Last post 12-22-2006 11:24 AM by kelsawy2000. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-19-2006 12:52 AM

    Hiding a picture programatically

    I am using Infopath 2003 with SP1. I added a button and picture in my form. When I click the button I want the picture to be hidden (disappear) and when click again to appear. This is to simulate an approval stamp.

    Is this doable in infopath by VB Script? Your help is greatly appreciated.
  • 12-19-2006 11:23 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Hiding a picture programatically

    Hi Kelsawy,

    For this you can add one field (True/False data type) to your data source and set by default value is false. You can write following code in your onClick event on button.

    If(XDocument.DOM.selectSingleNode("Xpath of your field").text == “false”)
    {
    XDocument.DOM.selectSingleNode("Xpath of your field").text == “true”
    }
    else
    {
    XDocument.DOM.selectSingleNode("Xpath of your field").text == “false”

    }

    You need to add conditional formatting on picture and condition is whichever you added new field is equal to ‘true#%92 hide this control.
  • 12-22-2006 11:24 AM In reply to

    Re: Hiding a picture programatically

    Thank you Shiva

    This worked out very well.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.