Adding Text to a Field in Contact Form

Is there a way to add text to the any of the fields in a contact form based on what a user clicked?

For instance if a button is click the text “You clicked this button” is added to the subject field of the contact form.

bump