How do I ask the user for more than one parameter in the same screen?

Answered

Comments

1 comment

  • Avatar
    Jake

    You can ask for multiple parameters in the same screen using a parameterGroup parameter, as shown in the example. Please note that parameter groups also need to contain a <name> tag.

    <parameterGroup>
     <name>userandpass</name>
     <explanation>Please enter the username and password for your database.</explanation>
     <parameterList>
     <stringParameter>
        <name>username</name>
        <default>admin</default>
        <description>Username</description>
      </stringParameter>
      <passwordParameter>
        <ask>yes</ask>
        <name>masterpass</name>
        <description>Password</description>
        <descriptionRetype>Retype password</descriptionRetype>
        <explanation>Please provide a password for the database user</explanation>
        <cliOptionName>password</cliOptionName>
      </passwordParameter>
      </parameterList>
    </parameterGroup>
    

Please sign in to leave a comment.