Hi Lion,
Thank for the advice, and your correct Radio button would be easier, i just had the checkbox code in another part of the website so tried to transfer.
The code you have sent over I can’t seem to grasp how to get the price for the course that is on the dynamic page. I will try and explain a little more of what is working to populate the fields, I’m just struggling to get them to toggle when the other box is ‘checked’
I’m have the below code which hopefully shows the outcome of what I’m trying to achieve.
export function radioGroup1_change(value, $w) {
let Price = $w("#dynamicDataset").getCurrentItem();
if (
(event.target.value === 'Radio Button1') {
$w('#pricePrivate1to1').text = Price.price11.toString();
}
if (event.target.value === 'Radio Button2') {
$w('#pricePrivate1to1').text = Price.privatePrice12.toString();
}
}
If I use this code in the onReady then it populates the fields, so I’m struggling to just get it to work within a toggle style onChange
let Price = $w("#dynamicDataset").getCurrentItem();
$w('#pricePrivate1to1').text = Price.price11.toString();
$w('#pricePrivate1to2').text = Price.privatePrice12.toString();
