Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Correctly populate the "specific page" field on the contact form #153
The 'Specific page' field on the
There's a whitespace change so I recommend using
The 'Specific page' field on the /contact/govuk form auto-populates with the previous page (ie the one the user followed the link from to get there). Originally, this would usually have been the page the user had been on when they spotted the issue they want to raise however, since we introduced the interstitial /contact page almost all traffic comes via this page - this means almost all named feedback that comes through to 2nd line relating to content issues lists the path as /contact, not the page the user is feeding back on. * Capture the original page the user started on, using the referrer to the /contact page, and saving it to a cookie * Pre-populate the specific page value with the value from the cookie if it’s been set
The code looks good.
One design question: with this implementation, the specific page name is pre-populated but not selected in the feedback form. Unless the user actively selects the "a specific page" option, the URL won't make it through to the ticket. Should the "a specific page" be selected by default, or alternatively should the path be added to the form as a hidden parameter and then passed through into Zendesk?