Required Form Fields with JavaScript


hello -

 

i have been working on pdf form using acrobat 9 pro.  form not submitted submit button rather filled out , saved user.

 

so, have been using javascript under actions>on blur

 

i have been through few different scripts because not javascript in adobe development tips work on both pc , mac.  then, in these forums kind enough me , worked.  problem if click inside of required form field without typing , click inside of required form field cursor not stay in first required form field clicked out of.  moves next required form field.  there way make cursor stay in first required form field until fill out?  in other words cannot click inside of form field until fill out required 1 clicked into.

 

the correct popup message appears when leave first field without filling out , click field want user not able click required field until fill out 1 clicked first.

 

here script using:

 

f = getfield(event.target.name)

if (f.value.length == 0)

    {

    // f.setfocus()

    //optional message - comment out next line remove

    app.alert("this field required. ")

    }

 

many thanks! 

think long , hard this. preventing user doing not allow user save form. end user can set acrobat/reader not allow javascript , defeat you.



More discussions in PDF Forms


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support