Get value of selected option in select field in a WordPress form
What are you trying to accomplish? You are assigning the value at the wrong place. It should be: jQuery(function($){ var value = $(“#field-id option:selected”).val(); console.log(value); //And then here use the value });