Nothing spectacularly simple comes to my mind.
My alternative would be to set the default input values to "Customer Name" and "Item Name" respectively. With a dash of JavaScript, you can automatically clear the input when the user gives it focus. An extra sprinkle will refill the input with "Customer Name" and "Item Name" if the input is left empty when the user blurs it.
Warning: I have little idea about JavaScript and its cross-browser compatibility issues. For example, I think getElementsByClassName
is not implemented in some versions of IE. Take this code as an example of what I mean rather than production code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Inline form</title>
<script type="text/javascript">
var valueHints = []
window.onload = function() {
var inputs = document.getElementsByClassName("value-hint");
for (var i = 0; i < inputs.length; ++i) {
valueHints[inputs[i].id] = inputs[i].value;
inputs[i].onfocus = function() {
if (valueHints[this.id] == this.value) {
this.value = "";
}
}
inputs[i].onblur = function() {
if (this.value == "") {
this.value = valueHints[this.id];
}
}
}
}
</script>
<style type="text/css">
.value-hint {
color:#999999;
}
</style>
</head>
<body>
<p>Hello <input class="value-hint" id="customer" type="text" value="Customer Name"></span>, This is to inform you that the <input class="value-hint" id="item" type="text" value="Item Name"> you ordered is no longer available.</p>
</body>
</html>