Dynamic subject on Contact form

I’m using the standard Contact form in my project. There are other places where a button on my website might sent the user to the contact form, but I would like to pre-populate the Subject and/or the Body of the message based on where the user clicked that led them there.

Is there a way to make this entry blank or default when just going to the contact form, and then dynamic at other times?