Is there a way to combine a radio button and submit button into one element for submitting the value just with a click? Currently, I have a radio button and a separate submit button in my code, but I want to streamline it.
This is the current code snippet:
{foreach item=item key=key from=$memberships}
<input type="radio" type="hidden" name="membership" value="{$key}" checked="checked"/>
{$item}
{/foreach}
<input class="button" type="submit" value="{lang mkey='continue'} -->"/>
I would like to replace the radio button and submit button with a single submit button. Can this be achieved? If so, how can it be implemented?
Here is what I envision:
Replacing the radio button and submit button with a combined input element as shown below:
<button type="submit" name="membership" value="{$key}">{$item}</button>