Button that sets references to a Form

Permalink
So what I'm trying to build, is a list of items (images) and a button underneath each item. When one of the buttons is clicked, one field (dropdown) in the Form is set to a particulair option in the dropdown. Is this possible? Maybe with a particulair link reference or something?

FischerVision
 
hutman replied on at Permalink Reply
hutman
You would need to do this with javascript, so it would be something like this

<button onclick="updateSelect('This Val');">Button Text</button>
<script type="text/javascript">
function updateSelect(value){
   $('#idOfSelectElement').val(value);
}
</script>


You need to make sure that the value passed in from the button matches the option value in the select element so that this works properly.