Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

When a user submits a form, how can we automatically obtain the url of the page?

Started by Marvin C., August 10, 2025, 11:57:43 PM

Previous topic - Next topic

Marvin C.

When a user submits a form, how can we automatically obtain the url of the page?The form is on the product page.I want to automatically obtain the link or product name of the product when the user submits the form.

Basara

Hello.
If you've added a custom form via the Form Manager, you can do this by adding a hidden input field to your form, then filling it with JavaScript when the page loads.

Wadenade

That's a great question! One way to automatically grab the URL after form submission is using JavaScript's document.location.href. You can store that value in a hidden field within the form before submission. It reminds me of trying to navigate a chaotic landscape – almost like dealing with the wild action in Crazy Cattle 3D! Makes you appreciate a clean, well-defined process for getting that URL. Hope this helps!


Forum Rules Code of conduct
AbanteCart.com 2010 -