<p>You can work around this Tag Manager bug by setting your form’s <code>action</code> attribute to the current page’s URL, rather than leaving it blank:</p>
<pre><code>&lt;form method=&quot;post&quot; accept-charset=&quot;UTF-8&quot; action=&quot;{{ craft.app.request.absoluteUrl }}&quot;&gt;
  ...
&lt;/form&gt;
</code></pre>

CC BY-SA 4.0
2024-09-02T19:07:27.730Z
2024-09-02T19:07:27.730Z
Brandon Kelly
<p>We are experiencing some issues with form submissions on websites that are using action inputs.</p>
<p>If a visitor denies analytics_storage via a cookie consent plug-in. Google Tagmanager will start using the URL passthrough function to pass the GCLID and other data otherwise stored in cookies by rewriting all URL's on a page.</p>
<p>This rewriting also happens on form submissions and will try to change the &quot;action&quot; attribute on the submitted form. To do this, the Google JavaScript tries to read the action parameter of the form and that's where things go wrong. Reading the action attribute of a form that's using the actionInput tag returns the complete HTMLInputElement instead of the action string. And Google appends that complete object to the rewritten action attribute. Resulting in a form that's submitted to: &quot;/[Object HTMLInputElement]?GOOGLE_STRING&quot;. Which obviously doesn't work.</p>
<p>Contacting Google about this issue seems like a pretty lost cause. But is there any way to solve this in our website or Google Tagmanager settings without disabling the URL passthrough?</p>

CC BY-SA 4.0
2024-06-20T15:09:08.510Z
I'm trying to find a solution to this too...
Masiorama
CC BY-SA 4.0
2024-08-25T19:38:19.263Z
did you find a solution? I am still lost on this...
Masiorama
<form><action>
URL passthrough rewrite failing when using actionInput
# URL passthrough rewrite failing when using actionInput

(Asked by: username_0 on 2024-04-11)

We are experiencing some issues with form submissions on websites that are using action inputs.

If a visitor denies analytics\_storage via a cookie consent plug-in. Google Tagmanager will start using the URL passthrough function to pass the GCLID and other data otherwise stored in cookies by rewriting all URL's on a page.

This rewriting also happens on form submissions and will try to change the "action" attribute on the submitted form. To do this, the Google JavaScript tries to read the action parameter of the form and that's where things go wrong. Reading the action attribute of a form that's using the actionInput tag returns the complete HTMLInputElement instead of the action string. And Google appends that complete object to the rewritten action attribute. Resulting in a form that's submitted to: "/[Object HTMLInputElement]?GOOGLE\_STRING". Which obviously doesn't work.

Contacting Google about this issue seems like a pretty lost cause. But is there any way to solve this in our website or Google Tagmanager settings without disabling the URL passthrough?

**Tags:** form, action
> **Comments:**
> **username_1**: I'm trying to find a solution to this too...  
> **username_1**: did you find a solution? I am still lost on this...  

---

## 1 answers

### Answer by username_2 on 2024-09-02. Score: 3

You can work around this Tag Manager bug by setting your form’s action attribute to the current page’s URL, rather than leaving it blank:

  ...


---

