Append Referring URL to Form

Client wants to know exactly what the visitor was looking at when they clicked the “get more info button.” I’ve got everything under control using the Pro Gallery and linking the image to a lightbox with my form; except I’m struggling to figure out how to add a hidden field to my form that pulls that referring URL data. Any help is appreciated!