Hide Form Label Using Custom Script
hello -
i using scripts on form make fields required user cannot go next field until type in. since user not clicking submit button found need create way.
the problem running not want form field label display. right label displays until user starts typing in field. using following scripts work great cannot figure out how set label display hidden.
under format>custom have following script
// custom format script text field
if (!event.value) {
event.value = event.target.username;
event.target.display = display.noprint;
} else {
event.target.display = display.visible;
}
if (app.runtimehighlight == true)
{
app.runtimehighlight = false;
}
then under actions>javascript have
f = getfield(event.target.name)
if (f.value.length == 0)
{
f.setfocus()
//optional message - comment out next line remove
app.alert("this field required.")
}
any appreciated!!
well, figured part out using following , removing custom script under format:
f = getfield(event.target.name)
if (f.value.length == 0)
{
f.setfocus()
//optional message - comment out next line remove
app.alert("this field required. please enter value.")
}
however, have issue working on pc. created using mac. when trying open on windows side slow , not let me type form fields.
More discussions in PDF Forms
adobe
Comments
Post a Comment