Below Spring form submits data to a Spring controller and works as expected.
How can I convert the checkboxes to buttons ? So instead of three checkboxes : ‘isTest1,isTest3,isTest3’ three buttons are displayed.
This then means instead of having one submit button I have three submit buttons with each button.
Here is my form currently :
<form:form method="post" modelAttribute="searchobj" action="redirect">
<table>
<tr>
<td><form:input path="param" /></td>
<td><input type="submit" value="Search"/></td>
</tr>
</table>
<table>
<td>isTest1</td>
<td><form:checkbox path="isTest1" /></td>
<td>isTest2</td>
<td><form:checkbox path="isTest2" /></td>
<td>isTest3</td>
<td><form:checkbox path="isTest3" /></td>
</tr>
</table>
</center>
</form:form>
I’ve tried linking the form directly to the submit button so instead of
<td><form:checkbox path="isTest1" /></td>
use
<td><input type="submit" value="isTest1"/></td>
but I dont how to access the value in the controller ?
I used :