Hi,
I would like to change various text elements to bold depending on a value selected from a dropdown, eg. user selects to search by region so when the region is returned from the dataset (into a repeater) the text would be bold. This needs to be conditional as there are other options to search on (in which case these would be bold)
I have tried the following...
$w("#text3").html = '<span style="font-weight:bold">${$w("#text3").text}</span>';
But his replaces the text in the region field for $w("#text3").text
Am I missing something?
Thanks,
Rachel
You need to set it in onChange event of the dropdown.
https://www.wix.com/code/reference/$w.Dropdown.html#onChange
Roi.
Eg. Value selected in dropdown is London and this is then shown in the repeater but after I add the code to make the text bold, the text remains as 'Region'?
Hope that makes sense!
Thanks
Thank you! That's made the text bold but it now doesn't display the return value from the dataset but the default value set in the repeater. It has also made the text smaller?!
Hi,
Yes. You need to use backticks ` ` and not ' '.
Good luck!
Roi.