SaaS CMS has officially launched! Learn more now.
AI OnAI Off
SaaS CMS has officially launched! Learn more now.
Can you not just change the value in the Selection Element within Optimizely, Or is it using a Data Feed ?
i want to chnage the value of the selection type. this selection is a default form element. so the id for IC_Club_Code is a guld which i can't use.please find the screenshot below
![](/contentassets/ec8ee26840934c7dac12d00fb23e2ead/image742.png)
Episerver admin screenshot:
![](/contentassets/ec8ee26840934c7dac12d00fb23e2ead/image740.png)
what is the best way to do it. i tried the following way but it didn't work.
const onContactClick = (desc: any) => {
const yOffsetContact = -100;
const element = document.getElementById("divContact");
const y = element.getBoundingClientRect().top + window.pageYOffset + yOffsetContact;
window.scrollTo({ top: y, behavior: 'smooth' });
var clubName = desc.ClubId.split("|")[1];
const selectElement = document.getElementsByTagName("select")[1];
selectElement.getElementsByTagName("option")[0].innerHTML = clubName;
console.log("ClubName :", clubName);
console.log("SelectOption:", selectElement.getElementsByTagName("option")[0].innerHTML);
}
here is the console result:
But unfortunatly the selection vale in not chnaging in the above screenshot