I have a column in my database which is called label
. When I try to display this on the Edit page, I get a conflict with the CSS for the label
class. Here is the Go code:
formList.AddField("Label Name", "label", db.Varchar, form.Text)
And this generates the following HTML:
<input type="text" name="label" value="Google" class="form-control label" placeholder="input Label Name">
The rule for class label
makes it hidden when the content is empty, which is clashing with our element here. Here is the CSS rule:
.label:empty {
display: none;
}
Is there a way to change the CSS for one single input element, or define a different class for it?