I was wondering how I could make an image as an form input, so if I would click on Image 1 then it will be highlighted and return Image 1's value in form post. Same goes for if I would click on Image 2.
Note that the Images should not be some kind of a post submit, more like a form option between Image 1 & 2.
HTML code section
<form>
<img src="http://pokeapi.co/media/img/18.png" />
<img src="http://pokeapi.co/media/img/2.png" />
<input type="hidden" id="imgvalue" name="imgvalue" value="" />
<input type="submit" />
</form>
I don't currently have a code but I would like to see a example so I can learn it and do it myself. Thanks in advance!