Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Designer
Viewing all articles
Browse latest Browse all 16286

Set textfield value to default value

$
0
0

Hi there.  I got a dozen textfields and datetimefields in a pdf fillable form create by livecycle designer.  All textfields and datetimefields have the  default values.  I got some javascripts to toggle checkbox to the effect that when checkbox is checked, the default value in the textfield will be cleared and let user to enter the new value; and when it is unchecked, the default value will be restored in the textfield.

 

default.jpg

 

 

if (this.rawValue == "1") {
  oTargetField = this.resolveNode("DateTimeField1");
   oTargetField.access = "open";
  oTargetField = this.resolveNode("TextField1");
   oTargetField.access = "open";
  this.resolveNode("TextField1").rawValue = null;
  this.resolveNode("DateTimeField1").rawValue = '';
  xfa.host.setFocus("TextField1");
}

 

if (this.rawValue == "0") {
this.resolveNode("TextField1").rawValue = defaultValue; }  

 

But, the script does not work when I uncheck the checkbox.  Any advice, please?


Viewing all articles
Browse latest Browse all 16286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>