Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How do I use a radio button to enable a image

Avatar

Avatar
Validate 1
Level 1
saskiahope
Level 1

Likes

0 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
saskiahope
Level 1

Likes

0 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
saskiahope
Level 1

15-08-2012

I'm trying to figure out how to use a radio button to enable a banner/background image so I guess my question is two fold:

1. How do I create a background image?

2. How do I use a radio button such that when it = Yes, the background image appears.

Thanks!

View Entire Topic

Avatar

Avatar
Validate 1
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
past-tense
Level 2

21-08-2012

Hello again,

Sorry about that. I followed my own directions, and there was only one hiccup.. The form variable doesn't always like to accept the default value the first time. Double check to make sure that the variable is set to "hidden". Go File > Form Properties > Variables, click on your variable, and make sure the pane to the right has "hidden" in it. Again, it's case sensitive.

The other spot where I can see a potential for an issue is where you mention that you're using two check boxes instead of radio buttons.

There are two ways this can be done. The first uses one check box, the other uses one radio button list with two radio buttons.

1) Checkbox:

     - See above. Note, there is only one checkbox used, and this script is on the change event.

2) Radio buttons:

     - Add two radio button controls to your form, and make sure that they both are contained within the same radio button list in the heirarchy panel.

     - Set one to Yes, the other to No

     - On the binding tab of the radio button list, make sure that the value for Yes is 1, and the value for No is 2

     - On the change event, put the following script:

          BackgroundVisibility.value = this.rawValue == 1 ? "visible" : "hidden";

     *** make sure this change event script is on the radio button list itself, not on one of the child radio button controls. To do this, select the radio button list in the heirarchy panel. You'll know you did it right if you should see three change event headers in the scripting pane, the first one for the list (script goes here) and one for each child radio button.

I have created a sample form that uses a radio button list. If you still have an issue, feel free to message me your email and I will send it your way.

Hope the above helps!

- Scott