javascript - Default text in an input field -
i looked everywhere couldn't find useful. need way put default text (preferably php variable) in html text field whenever load page. it's placeholder (i'm aware of placeholder attribute, don't want that) doesn't disappear user can submit value if wants.
i'm guessing can done simple javascript script suck @ that.
thank help.
you're looking value attribute then: value="text here"
with php variable, this:
<form action="path-here"> <input type="text" name="field-name" value="<?php echo $variable; ?>"><br /> <input type="submit" value="submit"> </form>
Comments
Post a Comment