The knowledge base is no longer actively updated, we have moved all content to our Community Support Forum

How can I disable or hide a parameter to the user?

Author: BitRock Support       Date: June 04, 2008 09:17       Tags: User input and custom installer pages
Look and feel

There are currently two ways to control whether a given parameter will be shown to the user or not:

- Setting the <ask> property to false: You can define it directly inside the parameter, or also you can configure it using a <setInstallerVariable> action, like you can do with any other parameter property. For instance:

    <setInstallerVariable name="parameter(name-of-the-parameter).ask" value="0">
      <ruleList>
        <!-- Here you can specify the rules that must be satisfied in order for the ask property to be set to zero -->
      </ruleList>
    </setInstallerVariable>


- Setting a <ruleList> inside the parameter. The parameter will be shown to the user only in case the conditions inside the <ruleList> are met. It would look like the following (in our example we are using a <booleanParameter>):

 <booleanParameter>
    <name>someName</name>
    <description>Some description</description>
    <explanation>Some Explanation</explanation>
    <default>1</default>
    <!-- More parameter properties can go here -->
    <ruleList>
      <!-- Here you can specify the rules that must be satisfied in order for the parameter to be shown -->
    </ruleList>
  </booleanParameter>


Another property that can also affect the display of a parameter is the <cliOptionShow> property. Setting it to zero will avoid this parameter to be shown on the help summary, that you can obtain by invoking the installer and passing to it the "--help" option. Please note that this will not prevent to effectively configure the parameter from the command line or an option file, it will just not show the parameter information to the user.

Comments

Show/hide parameters based on input from the same

Author: acwwat       Date: July 06, 2011 16:30

Is there any way to show/hide parameters based on input from the same page? For example, I would like to create a check box on a page which will show/hide additional user input fields depending on whether it’s checked.


Show/hide parameters based on input from the same

Author: jamminjase       Date: July 07, 2011 17:53

Yes, I would love to be able to the same thing. I currently banging my head against the wall trying to find a work around. The reason this feature would be nice is to minimize the amount of dialog windows the end user has to endure.


Re: Show/hide parameters based on input from the s

Author: wojciech       Date: July 08, 2011 09:00

Hello,

Unfortunately at the moment InstallBuilder cannot modify parameters so they are hidden/disabled. We may be able to implement that in the future, but is likely to take some time and we cannot provide an estimate of when/if it will be implemented.