I have input text like below
<input type="text" value="google.com" name="link">
user can change input and submit the form. In the same input I want to show href to already set value. For example if value of input text is set to google.com then user can go to google.com on clicking url value in input box. at same input box user should be able to change value of input by clicking inside input box
I tried as
<input type="text" value="<a href='www.google.com'>google.com</a>" name="link">
but it is not allowed like that. It treats all text as value
If I use
<a href="www.google.com"><input type="text" value="google.com" name="link"></a>
then user can not edit field as when he clicks anywhere in input box it goes to link google.com. Is there any other way to achieve this so only text inside input will be clickable