Liquid, JavaScript, themes, sales channels
Hi,
Hope someone can help me with this. I have created a button ("book viewing appointment") on my product page which will lead to another page ("appointment booking form"). I'd like some indication on the "appointment booking form" page whether it's an url or the product name to be automatically populated in the text field of the form once the button is clicked. Can someone shed some lights on how to do this, please?
The button code I've inserted on my Product page:
<div class="text-center">
<p>
<p>
<a href="weblink of the appointment booking form" class="btn">
BOOK VIEWING APPOINTMENT
</a>
</p>
</p>
</div>
The code of the text field I've added in the "appointment booking form" page is as below. At the moment it's having a placeholder text which I hope it can be filled automatically with the (previous) product page's url/product name that leads to the booking form when the button is clicked.
<label for="ContactFormProduct">Product *</label>
<input
required
class="required"
type="text"
id="ContactFormProduct"
name="contact[Product]"
placeholder="Product that I wish to view"
/>
Many thanks!
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024