Open the contact form with certain details filled in

The contact form generally opens with most fields empty. If you require readers to login, the reader's name and email address will be automatically filled in, but otherwise, all fields are empty.

But what if you'd like to be able to insert a link to your contact form that will prepopulate a few fields, like the contact form's subject or the submitter's name? You can pass these variables in as part of a link you're providing.

Here are the URL parameters you can use:

  • ?subject= will add text to Subject
  • ?body= will add text to Details
  • ?name= will add text to Your Name
  • ?email= will add text to Your Email

To create a link using one of these parameters, you'll use the base URL of your knowledge base (which may end in /help, /home, or /docs) + /contact-feedback

Example: https://support.knowledgeowl.com/help/contact-feedback

Add the first parameter after that with a question mark before it. Add any additional parameters with an & before them.

Example: https://support.knowledgeowl.com/help/contact-feedback?subject=Beta%20testing%20feedback (Will open the contact form with "Beta testing feedback" as the subject)

To include text with spaces or special characters, you'll need to encode those characters for the URL. You can see this in the example above where each space is a %20. If you're not familiar with URL encoding, don't worry! You can put the text you want encoded into this tool: https://www.urlencoder.org/ click Encode, and copy what it gives you.

Here's a much longer example using all the parameters: 

https://support.knowledgeowl.com/help/contact-feedback?subject=This%20form%20was%20pre-filled&body=As%20an%20example&name=Linus%20Owl&email=linus@knowledgeowl.com

Avoid long body text sent via the URL. Including more than a few words here may throw an error, especially if you're populating some of the other fields.

To use links like this within articles in KnowledgeOwl, create the full URL with the parameters you need, use the Insert Link option, and use that URL as the URL for the link.

Use cases

Linus likes using these parameters to make the contact form more convenient for his readers: if he knows why someone's contacting us (by clicking a link), it can be helpful to save them some time by prepopulating the subject and details with relevant information. 

Example: Insert a link into your documentation that reads "Contact us to upgrade your account", and pass "Account Upgrade" in as the subject line.

It can also be useful if you're referencing the contact form in your own website or application, where you might already have customer name and email information. You can pass that name and email over as part of the link they're clicking, so they don't have to fill out those fields.