You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched open and closed issues to make sure that the bug has not yet been reported
Issue is a Bug Report
This is a bug report and not a feature request, nor asking for self-hosted support
Using official Plausible Cloud hosting or self-hosting?
Self-hosting
Describe the bug
I have a get request in a form, where one of the expected params is provider and the value is the button that is clicked. The form works as expected when no event class is present, but if I add one the form submission is missing the provider param from the clicked button. There is also two hidden elements, returnUrl and __RequestVerificationToken which are always present in either case. The only one missing is the button's value.
here is an example of the form:
<formmethod="post" class="plausible-event-name--user-login-or-signup" action="/user/login"><inputtype="hidden" name="returnUrl" value="/return/url/example"><inputtype="hidden" name="__RequestVerificationToken" value="super-secret-token-value"><buttontype="submit" name="provider" value="Google" title="Log in using your Google account">
Login With Google
</button><buttontype="submit" name="provider" value="Apple" title="Log in using your Apple account">
Login With Apple
</button></form>
I suspect it is because plausible is capturing the submission via button click, stopping it, then re-submitting it via element.submit() or element.requestSubmit() but I am not sure.
Expected behavior
The button's value won't omitted when the form is submitted via a click on a particular button.
Screenshots
No response
Environment
- OS: Windows
- Browser: Chrome
- Browser Version: 132.0.x
The text was updated successfully, but these errors were encountered:
Easy workaround if you can edit the HTML is to just have multiple (almost) identical forms and move the button's value to a hidden input element:
<formmethod="post" class="plausible-event-name--user-login-or-signup" action="/user/login"><inputtype="hidden" name="returnUrl" value="/return/url/example"><inputtype="hidden" name="__RequestVerificationToken" value="super-secret-token-value"><inputtype=hidden" name="provider" value="Google" /><buttontype="submit" title="Log in using your Google account">
Login With Google
</button></form><formmethod="post" class="plausible-event-name--user-login-or-signup" action="/user/login"><inputtype="hidden" name="returnUrl" value="/return/url/example"><inputtype="hidden" name="__RequestVerificationToken" value="super-secret-token-value"><inputtype=hidden" name="provider" value="Google" /><buttontype="submit" title="Log in using your Apple account">
Login With Apple
</button></form>
Past Issues Searched
Issue is a Bug Report
Using official Plausible Cloud hosting or self-hosting?
Self-hosting
Describe the bug
I have a get request in a form, where one of the expected params is
provider
and the value is the button that is clicked. The form works as expected when no event class is present, but if I add one the form submission is missing theprovider
param from the clicked button. There is also two hidden elements,returnUrl
and__RequestVerificationToken
which are always present in either case. The only one missing is the button's value.here is an example of the form:
I suspect it is because plausible is capturing the submission via button click, stopping it, then re-submitting it via
element.submit()
orelement.requestSubmit()
but I am not sure.Expected behavior
The button's value won't omitted when the form is submitted via a click on a particular button.
Screenshots
No response
Environment
The text was updated successfully, but these errors were encountered: