Button Label - InfoPath Dev
in

InfoPath Dev

Button Label

Last post 01-27-2009 07:45 AM by swathip. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-26-2009 06:30 AM

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Button Label

    Hey all,

    Is it possible to change the label on button dependant on the value selected on a drop down list?

    Regards

    Chris

  • 01-26-2009 07:11 AM In reply to

    In a button's properties, you can click the fx button to tie the text on the button to the value of any field.  Just create a field that's not shown on the form to store the value that will appear on the button. Then all you need to do is add a rule to the dropdown box to set that field to the necessary value whenever an item in the dropdown box is selected.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-27-2009 03:49 AM In reply to

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Not in infopath 2003 :(

  • 01-27-2009 07:45 AM In reply to

    Hi,

    Add the following lines in view.xsl. Search with the button id. You will find some thing like

    <input class="langFont" title="" type="button" xd:CtrlId="CTRL1_5" xd:xctname="Button" tabIndex="0" value="Button">

     

    Replace the above line with the following.

    <input class="langFont" title="" type="button" xd:CtrlId="CTRL1_5" xd:xctname="Button" tabIndex="0">

    <xsl:attribute name="value">

    <xsl:value-of select="my:field1"/>

    </xsl:attribute>

    </input>

     

    Here my:field1 is the drop down field xpath.

     

    Note: Make sure to have a back up file before doing this.

     

    Swathip
    www.ggktech.com
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.