Select option value missing in form output
PermalinkI'm building a website where I need to make a simple function that when you click on a button a option in the form is selected. I do this with jQuery but it needs a value in the from and Concrete5 does not show any value in the html output so I can't get my jQuery to work.
This should be the output, but the value="" is missing in the output HTML at the moment. With other options, like checkbox, it does get the value output.
<select id="question"> <option value="question1"> question 1</option> <option value="question2"> question 1</option> <option value="question3"> question 2</option> <option value="question4"> question 3</option> </select>
And this is the jQuery code
$( "h1" ).click(function() { $("#question").val("question2"); });
I'm using the Tableless form add-on to build the form with div's.
$('#question>option:eq(1)').attr('selected', true);
http://jsfiddle.net/gaby/CWvwn/...