Field level behavior using Javascript

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Field level behavior using Javascript

    I am using Live Cycle designer with an XFA form that is reading its data from an XML data file -
    This is the best feature in all of Adobe land, etc ....
    however....
    in the real world - not all XML environments are the same or even sane.
    I have a situation where the schema is only being loosely adhered to - mostly in newer instances of the data suppler - while older data retains some legacy processing : like
    Not using a unique XML Element to define a separate data segment - but rather embedding important processing data at the value level .

    So ,with all that being said, my question is this -

    Is there a way to check the contents of a field - determine that I don't want to display ti- or that I do want to display it ???
    I don't just want an error message stating that it isn't X, or Y or Z ... , etc.

    For instance if I wanted to skip anything that had a null field for a particular field value - .

    if (this.rawValue == ""} {"do something : like set to a value that will fail the validate script ... };

    If I test it after the bind event - then follw that with a validation script ... etc ....
    This is what I am hoping that I can do .
    smde@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. enable review via document level javascript
      Dear all, My requirement is to programmatically enable shared for review functionality. I am half way through my requirement. I enabled the...
    2. add document level javascript from code
      Is it possible to use code (preferably IAC) to add document level Javascript (functions or document open actions) to a pdf? The only idea I can...
    3. designtime javascript behavior ?
      Hi all, How to access html object in designtime (vs.net use IE at designtime) and manipulate it ? I want to create a component that has a rich...
    4. copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?
      I have a web form with several fields. If I copy & paste from a RTF document into a field, the javascript validation and field length are bypassed...
    5. Memo field behavior
      Hello, In one application I can hit ctrl enter and get a new paragraph and in the second application I cannot. Both are memo fields. The only...
  3. #2

    Default Re: Field level behavior using Javascript

    Conditional printing of certain fields or an entire subform based on a script response to the value of a particular field ??? Is it at all possible in a dynamic PDF file ?

    My PDF file works well - but there are certain instances where I would like to be able to skip an iteration of a subform based on the value of certain fields or be able to print a couple of extra fields not normally printed when a particular value is sensed..

    Is this kind of thing only possible by manipluating the original XML data to include a trigger or a contrived XML segment that I generate for this reporting purpose ???
    smde@adobeforums.com Guest

  4. #3

    Default Re: Field level behavior using Javascript

    ??
    smde@adobeforums.com Guest

  5. #4

    Default Re: Field level behavior using Javascript

    The Answer is : Yes - of course you can -
    using something as simple as a switch statement::::::: You can do something like the following.

    var IsTestVal = this.boundItem(xfa.event.newText);
    var bEnableTextField = true;

    switch (IsTestVal)
    {
    case "Value1": //
    TextField1.rawValue = "Stuff for line1:\n- Line2\n- Line3\n- Summary";
    break;

    case "Value2": //
    TextField1.rawValue = "Condition2..."
    break;

    default: // unknown value -- do nothing
    bEnableTextField = false;
    break;
    }

    if (bEnableTextField)
    {
    TextField1.access = "open"; // enable field
    TextField1.caption.font.fill.color.value = "0,0,0"; // set caption to black
    }
    smde@adobeforums.com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139