Rich-text Reply

Problem with Checkbox

Mat2e 10-24-17

Problem with Checkbox

I have a problem with my A/B Test.

I'm trying to put a text message next to a checkbox at our product detail page, but everytime I change something concerning the checkbox it affects the status of the box itself so there is any longer no way to check a different box. It reloads the page like I checked something else, but the box keeps staying active anyway.

You can the the result on our testing page:


Is there a way to solve this problem?

Thank you in advance for your help!

Level 2

Michal 10-25-17

Re: Problem with Checkbox

Hi there,


Your issue lies with the fact that you are likely replacing an originally dynamic content with a static one - this is usually a result of selecting an element that is too generic and then using the 'replaceWith' function in the variation code (this is normally used by the visual editor if you choose the 'edit HTML' option). We speak about it in more detail here.


In order to avoid losing the functionality try to achieve your desired visual changes only with the use of adding new elements (the text message) next to already existing ones and changing the visual appearance of the existing elements via the css method of jQuery (in Optimizely's language it would be 'edit styles'). Also, always try to select the smallest possible element for your change (as opposed to selecting the container element and replacing the entire block on your page).


I hope this helps!