Is it possible to remove query strings from the [@Url] magic string? I have a client that uses that in a hidden field in Umbraco forms so they know on which page the user has submitted the form but they've noticed that they get a lot of values where query strings from google are added (for example if the user have clicked on an add on google search).
This causes trouble in their CRM (we send all form submissions to their CRM) since the url in question is to long for the CRM url field.
It's easy enough for me to create a simple answer type that just populates a hidden field with current page url but I thought I would ask just in case :)
Umbraco Forms. [@Url] magic string, remove Querystrings
Is it possible to remove query strings from the [@Url] magic string? I have a client that uses that in a hidden field in Umbraco forms so they know on which page the user has submitted the form but they've noticed that they get a lot of values where query strings from google are added (for example if the user have clicked on an add on google search).
This causes trouble in their CRM (we send all form submissions to their CRM) since the url in question is to long for the CRM url field.
It's easy enough for me to create a simple answer type that just populates a hidden field with current page url but I thought I would ask just in case :)
You can access other request values as magic strings as well, so I think [@Path] magic string would give you the page path without the query string.
https://docs.umbraco.com/umbraco-forms/developer/magic-strings#request
Thanks for the suggestion but [@Path] didn't work (even though it's a part of HttpContext.Request).
Oh well, I'll create a simple answer type for currentpage url :)
is working on a reply...