# Datagrid action submits form

**URL:** <https://community.weweb.io/t/datagrid-action-submits-form/17633>\
**Category:** Ask us anything\
**Tags:** data-grid\
**Created:** [April 6, 2025, 10:29am UTC](https://community.weweb.io/t/datagrid-action-submits-form/17633 "2025-04-06T10:29:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreaslea](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/andreaslea/32/12977_2.png) [@andreaslea](https://community.weweb.io/u/andreaslea)\
**Post date:** [April 6, 2025, 10:29am UTC](https://community.weweb.io/t/datagrid-action-submits-form/17633/1 "2025-04-06T10:29:38Z")

</div>

Hi!

I have a form containing among other things a (new) data grid.

Clicking any action in the datagrid submits the form.  
(Even with no workflows defined on the datagrid.)

Am I missing something, or is this a bug?

The problem is solved if i move the datagrid outside the form, but for my layout that means also moving the submit button outside the form (making validation more complicated).

---

<div class="post-metadata">

**Author:** ![andreaslea](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/andreaslea/32/12977_2.png) [@andreaslea](https://community.weweb.io/u/andreaslea)\
**Post date:** [March 11, 2026, 5:22pm UTC](https://community.weweb.io/t/datagrid-action-submits-form/17633/2 "2026-03-11T17:22:19Z")

</div>

If anyone else has this problem, I finally figured it out:

The button used in an action column doesn’t have a defined type, so when the datagrid is inside a form, it automatically becomes a submit button…

You can fix this by forking the component and setting the type explicitly to button.  
Inside ActionCellRenderer.vue, insert a new line so the button definition is:

\<button  
**type=“button”**  
@click.stop=“onButtonClicked”  
etc etc…

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [March 11, 2026, 5:38pm UTC](https://community.weweb.io/t/datagrid-action-submits-form/17633/3 "2026-03-11T17:38:00Z")

</div>

Beautiful! Thanks for taking the time to share your solution on here, Andreas. Really appreciate it 🙂
