Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Autofill a contact form with a url query string



Site URL: https://vineyardcolumbus.org/contact-staff

It seems that a common problem with providing a staff page for large organizations is how to enable contact links for staff members' emails without endangering their inboxes with spam due to malicious email scrapers.

Squarespace does not currently provide an option for obfuscating or encrypting email addresses through the Link Editor. So my workaround for several clients has been to direct all "Contact Me" links to a single contact form on a separate page.

However, it would be nice if we could pass a url parameter through to auto-populate a field in that form such as "Who are you trying to reach?" to essentially fill in that field for the user based on whichever staff members' contact link they clicked to arrive there.

Here's the staff page I'm working on: https://vineyardcolumbus.org/our-leadership#leadership-campus-pastors-section where every Contact link directs to https://vineyardcolumbus.org/contact-staff 

My idea would involve setting the contact link for each staffer's gallery image (in the description field) as a text link with a href value of something similar to this: https://vineyardcolumbus.org/contact-staff?text-yui_3_17_2_1_1588078038493_298709-field=Charles%20Montgomery

"text-yui_3_17_2_1_1588078038493_298709-field" is the id of the text field I want to populate (and though it contains a 'yui' seems to be a consistent id on any page load)

"Charles%20Montgomery" is the value that would be plugged into that field if we clicked on Charles' contact link (and would display in the field as "Charles Montgomery")

So what javascript could I insert on the Contact Staff page or header code injection that might accomplish this? Any help would be greatly appreciated.


Edited by hellothisisjeff
Link to post
  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...