# Submit html form by selecting radio button without using a submit button

**URL:** <https://discourse.nodered.org/t/submit-html-form-by-selecting-radio-button-without-using-a-submit-button/89546>\
**Category:** General\
**Tags:** dashboard\
**Created:** [16 July 2024 16:37 UTC](https://discourse.nodered.org/t/submit-html-form-by-selecting-radio-button-without-using-a-submit-button/89546 "2024-07-16T16:37:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [16 July 2024 16:37 UTC](https://discourse.nodered.org/t/submit-html-form-by-selecting-radio-button-without-using-a-submit-button/89546/1 "2024-07-16T16:37:21Z")

</div>

I have a flow which gives me 6 options in the form of radio buttons to chose from and sends selected payload upon clicking the SUBMIT button.  
what i need is the submit to happen on just selecting an option among the radio button, that is it should execute without clicking the submit button. .

how do i acheive that ?

```auto
[{"id":"5cc1176ba37a330e","type":"ui_template","z":"5b623fd31ca86a42","group":"422c63c25531cb58","name":"CHOSE MACHINE","order":1,"width":"30","height":"2","format":"<form ng-submit=\"send({payload: mymodel})\">\n<table width = \"100%\">\n<tr>\n<td><input type=\"submit\" value=\"Submit\"></td>\n<td> <input type=\"radio\" id=\"mc0\" name=\"mc\" value=\"MC0\" ng-model=\"mymodel.select\"><label for=\"mc1\">MC0</label> </td>\n<td> <input type=\"radio\" id=\"mc1\" name=\"mc\" value=\"MC1\" ng-model=\"mymodel.select\"><label for=\"mc2\">MC1</label> </td>\n<td> <input type=\"radio\" id=\"mc2\" name=\"mc\" value=\"MC2\" ng-model=\"mymodel.select\"><label for=\"mc3\">MC2</label> </td>\n<td> <input type=\"radio\" id=\"mc3\" name=\"mc\" value=\"MC3\" ng-model=\"mymodel.select\"><label for=\"mc3\">MC3</label> </td>\n<td> <input type=\"radio\" id=\"mc4\" name=\"mc\" value=\"MC4\" ng-model=\"mymodel.select\"><label for=\"mc3\">MC4</label> </td>\n<td> <input type=\"radio\" id=\"mc5\" name=\"mc\" value=\"MC5\" ng-model=\"mymodel.select\"><label for=\"mc3\">MC5</label> </td>\n</tr>\n</table>\n </form>","storeOutMessages":true,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"local","className":"","x":1235,"y":275,"wires":[["6738ab4a14842435","795c194bbd4f50de"]]},{"id":"6738ab4a14842435","type":"debug","z":"5b623fd31ca86a42","name":"debug 2632","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1455,"y":275,"wires":[]},{"id":"8e8f6bdd4e0dc010","type":"ui_toast","z":"5b623fd31ca86a42","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"","x":1365,"y":375,"wires":[[]]},{"id":"795c194bbd4f50de","type":"change","z":"5b623fd31ca86a42","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"You have selected","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload.select","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1300,"y":325,"wires":[["8e8f6bdd4e0dc010"]]},{"id":"422c63c25531cb58","type":"ui_group","name":"TABLE","tab":"5e0dd10e66fdea95","order":1,"disp":false,"width":"30","collapse":false,"className":""},{"id":"5e0dd10e66fdea95","type":"ui_tab","name":"TEST","icon":"dashboard","order":8,"disabled":false,"hidden":false}]

```

![submit](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c59b9423441b91ffe383a407f5444c35874183dc.gif)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 July 2024 17:23 UTC](https://discourse.nodered.org/t/submit-html-form-by-selecting-radio-button-without-using-a-submit-button/89546/2 "2024-07-16T17:23:15Z")

</div>

you can use ng-click

```auto
<form>
<table width = "100%">
<tr>
<td> <label><input ng-click="send({payload: 'mc0'})" type="radio" id="mc0" name="mc" value="MC0">MC0</label> </td>
<td> <input type="radio" id="mc1" name="mc" value="MC1" ng-model="mymodel.select"><label for="mc2">MC1</label> </td>
<td> <input type="radio" id="mc2" name="mc" value="MC2" ng-model="mymodel.select"><label for="mc3">MC2</label> </td>
<td> <input type="radio" id="mc3" name="mc" value="MC3" ng-model="mymodel.select"><label for="mc3">MC3</label> </td>
<td> <input type="radio" id="mc4" name="mc" value="MC4" ng-model="mymodel.select"><label for="mc3">MC4</label> </td>
<td> <input type="radio" id="mc5" name="mc" value="MC5" ng-model="mymodel.select"><label for="mc3">MC5</label> </td>
</tr>
</table>
    </form>

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 July 2024 17:23 UTC](https://discourse.nodered.org/t/submit-html-form-by-selecting-radio-button-without-using-a-submit-button/89546/3 "2024-07-30T17:23:58Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
