Im using Crowdcrafting which allows you to make an application with Twitter Bootstrap quite easily (without setting up a server etc).
Anyhow Im really struggling to get the drop down value to store. The buttons I've made store a value fine. I'm unsure whether the problem is in how I'm trying to store the drop down value or due to the fact I'm trying to store more than one thing. I appreciate this may be a bit difficult to answer without knowing about the platform but I'd be really thankful for any input where appropriate :). Very bereft of coding skills so apologies if this is a really basic problem. Cheers.
<div>
<select id="answer1" class = "btn-success btn-mini">
<option>Woodland & Scrub</option>
<option value="A1">Woodland
</option>
<option value="A2">Scrub
</option>
blah blah blah....
</select>
</div>
<h1 id="question2"></h1>
<div id="answer">
<button class="btn btn-success btn-answer" value2 ="Certain"><i class="icon icon-white icon-thumbs-up"></i> Certain</button>
<button class="btn btn-answer btn-warning" value2="FCertain"><i class=""></i> Fairly Certain</button>
<button class="btn btn-answer btn-danger" value2="Unsure"><i class="icon icon-white icon-thumbs-down"></i> Unsure</button>
</div>
var answer = $ (evt.target).attr("value2"); //this bit works ok
var selected_answer1 = $("#answer1 option:selected").val("value"); //this bit not so much
if (typeof answer != 'undefined') {
console.log(answer);
console.log(selected_answer1);
pybossa.saveTask(task.id, answer, task.info.question1.selected_answer1).done(function() {
deferred.resolve();
});