• Manishagr83
    August 11, 2015 at 9:15 pm #630

    I am using the 8.5.5 community version of Radio button and it is not clear how we populate the options in the radio button. I tried binding a NameValuePairList to the control but it won’t populate anything other than the default Radio Button option. Also is there a configuration option or any HTML attributes to align the radiobutton vertically?

    August 12, 2015 at 9:06 am #633

    Hey Manishagr83,

    When you say populate the options in the Radio Button, I’m going to assume you mean the values that are returned when a Radio Button is selected. The data binding to TeamWorks variables is used to store the selected value of a Radio Button into these variables, not to determine what the radio button label or value is.

    To assign a value to be returned when the Radio Button is selected, you could either bind a variable to the Value When Selected in the Behavior Configuration option, or add a static value in the text box. Any basic data type can be used as a return value (for example: string, integer, decimal, boolean, etc.)

    If you would like to create a Radio Button group, you would make use of the Behavior Configuration option Group Name. All Radio Buttons with that group name will be a part of the same group, allowing only one of the Radio Buttons in that group to be selected at a time. To answer your second question, there is not a configuration option to align them vertically, but you could use the Vertical Layout control. Simply add a Vertical Layout control to the coach, then drag as many Radio Buttons as you need into the layout.

    -Elliot P

    August 12, 2015 at 10:04 am #640

    By Options, I meant the display labels for the radio button like “Yes”, “No” which i later found is taking from the Label set for the control. From what you have mentioned it looks like if I have a requirement to show a HTML Radio button with options as “Yes” and “No” for user to select, I will have to add two radio button control with Label as “Yes” for one and “No” for another and then give both of them as same group Name for them to show as together.  I am guessing (still have to try this in my designer) I will have to place them in a horizontal layout to show as Radio button side by side. Also if I have to give a generic label like “Are you Sure” in front of this Radio button, i have to add another control in the horizontal layout for them all to look like one HTML Radio button. Can you please confirm this is correct assumption or there is a simpler control or better way to do it.

    August 12, 2015 at 10:11 am #641

    You are correct in your thinking that the Radio Button Label is meant to be used as the selection option in a Radio Button list. Or in other words, if you have a list of colors, your labels would be: red, orange, blue, green. If you wanted to add a label to name this selection list, you would need to make use of another control to accomplish this. You could use the label of the Horizontal Layout to accomplish this, or even drag an Output Text control.

    August 12, 2015 at 10:17 am #642

    Thanks Elliot for the prompt reply. So in your example of “list of colors, your labels would be: red, orange, blue, green”, can you confirm I will have to add four Radio button controls inside an horizontal or vertical section to show them together as horizontal or vertical.

    August 12, 2015 at 10:26 am #643

    Yes, with Spark controls you will need to add 4 Radio Buttons in our example to show 4. Though, it’s worth mentioning that you could use a table and a list variable to create multiple of them. Attached are images of my coach in PD and when it’s in runtime.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search