Show/Hide InfoPath Help Text

Introduction

Requirement: Create a user-defined InfoPath section that can be displayed or hidden based upon the user’s need.

Table of Contents
  •  

    Create Control List Fields

    In order to create ‘Help’ buttons for your form user’s, first create control fields in your custom list for each of your Help sections.

        1. Create a new column:
          1. Column name:  ShowHideBGDesc, ShowHideSTGYDesc, ShowHideBusTypeDesc, etc.
          2. Type: single line of text
          3. Required: No
          4. Accept defaults for everything else

    Add ‘ShowHidexxxx‘ columns for every needed InfoPath help section you will create in the next section.

    Customizing the InfoPath form

    If you don’t already have a list form that you need to customize, create one now. It can be based on a Custom list template, or any other list template that you need, such as Tasks.

     

    • Add Picture button that user will Click to show/hide the Help text section
    • Add Help Text section
    Help Text InfoPath form section and Picture button

    Help Text InfoPath form section and Picture button

    Picture button rules
    1. Click on Picture button
    2. Click on Manage Rules from Home tab of InfoPath form
    3. Create a new Action Rule
    4. Set Condition to:
    • In first dropdown field, choose Select a field or group…
    • Select appropriate field, ShowHideSTGYDesc
    • In middle dropdown field, Select is blank
    • In And field dropdown field, Select or
    • In second line first dropdown field box, choose Select a field or group…
    • Select same field as previous, ShowHideSTGYDesc
    • In middle dropdown field box, Choose is equal to
    • In third dropdown field box, Choose Type a number…
    • Type ‘3’ (without quotes)
    • Click OK
    5.  Add an Action by Clicking Add
    6.  Select Set a field’s value
    7.  In Field box, Click field selection box and Choose same field as previous, ShowHideSTGYDesc
    8.  In Value field, Type ‘2’ (without quotes)
    9.  Click OK
    10.  Ensure that Don’t run remaining rules if the condition of this rule is met
     

    11.  Create another Action Rule on picture button
    12.  Set Condition to:

    • In the first dropdown field, choose Select a field or group…
    • Select same field as previous, ShowHideSTGYDesc
    • In the middle dropdown field box, choose is equal to
    • In the third dropdown field box, Choose Type a number…
    • Type ‘2’ (without quote)
    • Click OK
      13.  Add an Action by Clicking Add
    14.  Select Set a field’s value
    15.  In Field box, Click field selection box and Choose same field as previous, ShowHideSTGYDesc
    16.  In Value field, Type ‘3’ (without quotes)
    17.  Click OK
     Help Section Rules
    1.  Select appropriate InfoPath section that will be tied to the previously set up Picture button
    2. Click on Manage Rules from Home tab of InfoPath form
    3. Create a new Formating Rule
    4. Set Condition to:
    • In the first dropdown field, Choose previously set up field, ShowHideSTGYDesc
    • In middle dropdown field, Choose is not equal to
    • In third dropdown field box, Choose Type a number…
    • Type ‘2’ (without quotes)
    • Click OK

    5.  Under Formatting, Place a check in Hide this control field