Currently I'm showing a checkbox for Terms and Privacy links using the <parametergroup> and I would like to disable the Next button if user don't check that checkbox. Appreciate if someone can help me how to do. Thanks in advance.

asked 27 Mar, 15:50

Siddu's gravatar image

Siddu
1
accept rate: 0%


It's not possible to disable the next button but you can use a <validationActionList> to prevent the user from continuing the installation.

In the following example the <showquestion> action has a rule checking for the value of the checkbox. If the value is false the user will be asked if he wants to quit.. If the user answers no, we use <setinstallervariable> to set the next_page variable to be the same page to prevent the installer from continuing to the next page. If the user answers yes the installer will quit.

<parameterGroup>
<name>termsAndConditions</name>
  <parameterList>
    <linkParameter>
      <name>linkToTermsAndConditions</name>
      <description>http://example.com/TermsAndConditions</description>
      <clickedActionList>
        <launchBrowser>
          <url>http://example.com/TermsAndConditions</url>
        </launchBrowser>
      </clickedActionList>
    </linkParameter>
      <booleanParameter>
      <name>choice</name>
      <default>1</default>
      <displayStyle>checkbox-left</displayStyle>
      <description>Deselect this box if you do not agree with the Terms and Conditions</description>
    </booleanParameter>
  </parameterList>
  <validationActionList>
    <showQuestion>
      <text>Do you want to quit?</text>
      <variable>quit</variable>
      <ruleList>
        <compareValues logic="equals" value1="${choice}" value2="0">
        </compareValues>
      </ruleList>
    </showQuestion>
    <exit>
      <ruleList>
        <compareText logic="equals" value="${quit}" text="yes">
        </compareText>
      </ruleList>
    </exit>
    <setInstallerVariable name="next_page" value="termsAndConditions">
      <ruleList>
        <compareText logic="equals" value="${quit}" text="no">
        </compareText>
      </ruleList>
    </setInstallerVariable>
  </validationActionList>
</parameterGroup>
link

answered 30 Mar, 06:38

Michiel's gravatar image

Michiel ♦
82114
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×22
×9
×6

Asked: 27 Mar, 15:50

Seen: 84 times

Last updated: 30 Mar, 06:38