Unable to make these input fields clickable
Each item needs to be clickable and pass the input value "id" to the form action route
<form action="/rodada/">
{{#musicas.1}}
{{#.}}
<div class="opcao">
{{titulo}} - {{artista}}
<input id="opcao" class="shh" type="submit" name="musicaAtual" value="{{idTrackDeezer}}">
</div>
{{/.}}
{{/musicas.1}}
</form>
CSS:
#wp-respostas{
margin-top: 8%;
}
.opcao{
background-color: #fba69d;
text-align: left;
border: 1px solid salmon;
border-radius: 5px;
padding: 4px 0px 4px 4px;
margin-bottom: 5px;
}
.shh{
display: none !important;
}
FINAL RESULT (not clickable)
https://i.sstatic.net/o420t.png
Working code with thanks to Dan Oswalt:
{{#musicas.1}}
{{#.}}
<div class="opcao" onclick="window.open('/rodada/?id={{idTrackDeezer}}', '_self');">
{{titulo}} - {{artista}}
</div>
{{/.}}
{{/musicas.1}}