Hi,

I have searched through the Questions, and the User Guide, and I am struggling to figure out how to preselect a radio button based on a variable value, and disable the other one.

For example, I set the InstallationType in a Pre-installation action, but later on want to preselect a radio button based on that value (I'm using a ChoiceParameter), and disable the other one.

thanks.

asked 16 Mar '12, 10:43

bstoke's gravatar image

bstoke
16212224
accept rate: 0%


You just have to select the value of the appropriate radiobutton in the choiceParameter value. For example, to select option2:

<choiceParameter>
    <name>choices</name>
    ...
    <value>option2</value>
    <displayType>radiobuttons</displayType>
    <optionList>
        <option>
            <description>Option 1</description>
            <text>Option 1</text>
            <value>option1</value>
        </option>
        <option>
            <description>Option 2</description>
            <text>Option 2</text>
            <value>option2</value>
        </option>
    </optionList>
</choiceParameter>

It can be also configured programmatically using:

<setInstallerVariable name="project.parameter(choices).value" value="option2"/>
link

answered 16 Mar '12, 12:01

juanjo's gravatar image

juanjo ♦♦
4.7k412
accept rate: 24%

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:

×17
×2
×1

Asked: 16 Mar '12, 10:43

Seen: 913 times

Last updated: 16 Mar '12, 12:01

powered by BitNami OSQA