Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Fully fill bubble by default

Avatar

Former Community Member

I am trying to create a form where the radio buttons and check boxs fill in completely, not a dot within the circle, when checked so that our recognition software will have a better chance of recognizing that the option has been selected.

I am trying to find a way to do this by default.  For the check boxes I created a method on change that does the following.

if(bubbleField.rawValue >= 1)

   bubbleField.ui.checkButton.border.fill.color.value = "0,0,0";

}

else

{

    bubbleField.ui.checkButton.border.fill.color.value = "255,255,255";

}

This would work fine for the radio buttons as well if "change" got called on all buttons individually when one changes but since it does not I would have to loop over the list of buttons, which is giving me a headache, so I hoped there was a way to set the default behavior for all buttons to be COMPLETELY filled or empty, not partial fill.

Ideas?

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Have a look here http://assure.ly/kp60nk and see if that helps.

Niall

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

Hi,

Have a look here http://assure.ly/kp60nk and see if that helps.

Niall

Avatar

Level 10

ps I would be inclined to use a solid circle/square for the radio button/checkboxes instead of the default raised border. Also in the example the green colour can be substituted for black.

N.

Avatar

Former Community Member

Was not aware of this.  Not  a universal default behavior but looks promissing on handling my group of 15 radio buttons.  Little tedious since it appears he resets all the buttons then has an else if for all of his 3, my 15.  For some reason I had "change" stuck in my head when "click" was the correct answer.  Great resource.

Thank you so much.

Avatar

Level 10

You're welcome. If you can hold on I know I have a more efficient loop solution back at base. It is generic and can be slotted into any rb group and will work out of the box. However it will be a few hours/tomorrow before I get to it.

Niall

Avatar

Level 10

I have added a second example, which improves the script. Same link (http://assure.ly/kp60nk).

Good luck,

Niall