Rich-text Reply

testing default value in dropdown

beardedcolonel 09-27-16

testing default value in dropdown

Hi,

 

I am trying to test the dropdown on this page https://beardedcolonel.co.uk/shop/5-blade-razor

I want to see if having a different option as default will impact the conversions. 

 

I setup the variations by changing the selected value of the dropdown HTML

but in testing this hasnt had any impact. It works in the editor but not in preview or live - 

 

When I switch to interactive mode then I am able to select the different variations, but as soon as I switch back to edit mode then it reverts - 

 

Any suggestions would be greatly appreciated!

 

Thanks

robertchan 09-28-16
 

Re: testing default value in dropdown

Seems like $ is undefined on the page you sent, but jQuery is defined. Not sure if you're using the variation code or WYSIWYG, but I've created the following code for you, just copy and paste it into the variation code of your experiment and modify the drop down values to what you want:

 

jQuery('#how-often option[value="Each month"]').text('You could have whatever you like');
jQuery('#how-often option[value="Every 2 months"]').text('Yeah, you could have whatever you like');
jQuery('#how-often option[value="Every 3 months"]').text('Yeahhh');

Also note that that code will only change the text, if you need to change the value as well, you'll need to adjust that accordingly.

Robert Chan

Experimentation Hero