List of "buttons" to make POST requests
Hi,
I'd like to create something like this (list items with thumbnails):
But where clicking on the item makes a POST request. I've tried using buttons in the following way:
- <form action="/thing" method="post">
- <ul data-role="controlgroup">
- <li><button type="submit" name="name" value="thing1"></button></li>
- <li><button type="submit" name="name" value="thing2"></button></li>
- <li><button type="submit" name="name" value="thing3"></button></li>
- </ul>
- </form>
But if I add image tags inside the button they do not display unless I add data-role="none" and then the styling is lost.
Ideally I'd like to use the example above, but turn the <li> elements into links that make POST requests. Is this possible? If not, is it possible to style buttons in the same way? Could someone give me an example?
Thank you,
Chris