I want to send a value to the form field with the jQuery. Here's the basic code, it will work fine:
<input id="logo" name="logo" type="text" />
jQuery:
jQuery('#logo').val(imgurl);
However, I need to change the field ID to option[logo]
. So I am trying this:
<input id="option[logo]" name="option[logo]" type="text" />
jQuery:
jQuery('#option[logo]').val(imgurl);
This does not work. How this can be fixed?