Dynamic Dataset for alpha Radio button component

Hi Team,
Is there any option available to set a dynamic dataset for the Alpha Radio Button component?
I’m looking to bind the radio button values dynamically instead of using a static dataset.
Please let me know if this is supported or if there’s any recommended workaround.

2 Likes

Hi @Aseema
Please use this snippet to dynamically set the radio button options.

// Page - On Init trigger
const elementInstance = ap.$(-element-id-);

// :repeat_button: dynamic radio options update
elementInstance.options.options = [
{ value: “Male”, display: “Male” },
{ value: “Female”, display: “Female” },
{ value: “Others”, display: “Others” }
];

// UI update
elementInstance.requestUpdate();

1 Like

@irfanali Thank you so much. It is working.