Liljeqvist
Coder
I am not sure if this belonged in the CSS or JavaScript section.
I am building a CMS application, and I am stuck at creating input fields for buttons.
The user is allowed to enter a link using an URL-type input field, but when I follow the example from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url I am only able to output the entire address for the link, which of course is not exactly pretty.
I much rather have a line that says "Click me" and store the url inside that, but how do I accomplish this through input fields? Is there some way to "mask" it?
For example, if I am manually creating a link, I would simply write:
But keep in mind that this is an application that is based on user-inputs. I cannot expect the user to go in and manually create a button and a link inside the HTML file.
So how do I do it with the code below?
I am building a CMS application, and I am stuck at creating input fields for buttons.
The user is allowed to enter a link using an URL-type input field, but when I follow the example from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url I am only able to output the entire address for the link, which of course is not exactly pretty.
I much rather have a line that says "Click me" and store the url inside that, but how do I accomplish this through input fields? Is there some way to "mask" it?
For example, if I am manually creating a link, I would simply write:
Code:
<a href="url address">Click here</a>
But keep in mind that this is an application that is based on user-inputs. I cannot expect the user to go in and manually create a button and a link inside the HTML file.
So how do I do it with the code below?
Code:
<input id="myURL" name="myURL" type="url">