alafair
asked on
Javascript question
I created this form image And in the field “due date” I added the custom format
if (!event.value) {
event.value = "DATE";
event.target.display = display.noPrint;
event.target.textColor = color.ltGray;
event.targer.fontWeight = 'bold';
} else {
event.target.display = display.visible;
event.target.textColor = color.black;
}
Basically what it does is that it’s light grey originally, and it tells the user to input a “DATE.” When the user inputs a date, the word “DATE” disappears and the font turns black. This works fine.. .but what doesn’t work is making the text bold
if (!event.value) {
event.value = "DATE";
event.target.display = display.noPrint;
event.target.textColor = color.ltGray;
event.targer.fontWeight = 'bold';
} else {
event.target.display = display.visible;
event.target.textColor = color.black;
}
Basically what it does is that it’s light grey originally, and it tells the user to input a “DATE.” When the user inputs a date, the word “DATE” disappears and the font turns black. This works fine.. .but what doesn’t work is making the text bold
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
if (!event.value) {
event.value = "DATE";
event.target.display = display.noPrint;
event.target.textColor = color.ltGray;
event.target.fontWeight = 'bold';
} else {
event.target.display = display.visible;
event.target.textColor = color.black;
}
event.value = "DATE";
event.target.display = display.noPrint;
event.target.textColor = color.ltGray;
event.target.fontWeight = 'bold';
} else {
event.target.display = display.visible;
event.target.textColor = color.black;
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
the target is the field where the date is, when someone enters a date I want it to be bold but otherwise just display the word date in a light gray faded word date, Frameworks?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm actually helping someone so I will have him try that and will let you know. Thank you
ASKER
ok event.target.style.fontWei ght = 'bold' did not work, how about an event to change the font to a font that is already bold like helvetica bold?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER