Inserting content into a form field via button click

I want to have text inside of a form input change depending on what radio buttons are clicked.
Eg) by default the field has a url ‘domain . com’
If someone clicks radio button 1, the text in the field becomes domain . com?1
If someone clicks radio 1 and 2, it becomes domain . com?1&2

This is because I am generating expiring links with zapier +
The text has to be in a form field, otherwise I can’t send it through zapier.

Im hoping theres a custom code solution that will add or remove text inside of a form input. Even better if the viewer cannot edit the input text that shows up, which goes against input logic of course.
Any alternative ways to send this text-data to zapier is welcomed.

Ill be hugely indebted to whoever helps me because I feel like ive hit a wall!

Thanks in advance <3

Yea, that’s fairly straight forward. I can’t really support it, but spent a couple of minutes to whip up an example project for you.

Review the custom code on the home page, look at the id’s set for the radio button and email input field.

I think that’ll get you enough to go the rest of the way on your own :smile:

Thank you ChrisDrit! Really useful - hopefully other people find your project useful too