Retrieving HTML field input to change a href value on a button in an HTML snippet on a page

Retrieving HTML field input to change a href value on a button in an HTML snippet on a page

Is there any way to achieve this? Please let me know, I have desperately been searching for a solution