Conditional formatting (colour) lost when form is saved and reopened?

ellis355

23-03-2015

Hi All

This one has got me confused! I have set drop downs to change color depending on the selection using the following code:

if ($.boundItem(xfa.event.newText) == "1") {

  this.resolveNode("$").ui.oneOfChild.border.fill.color.value = "153, 204, 0";

}

if ($.boundItem(xfa.event.newText) == "2") {

  this.resolveNode("$").ui.oneOfChild.border.fill.color.value = "255, 153, 0";

etc

I have this in the 'Change' event and the 'Layout Ready' event, I have also tried it in the 'Initialize' event but with no success. The issue is this: the colour changes fine as the user fills in the form however is lost when they save and reopen (the selection values are fine just the color coding is lost)

BTW I am saving the PDF with 'Extended Features' as I thought maybe this could be a 'licence' related issue with Adobe Reader

Does any one have any idea of where to look to solve my problem please?

Many thanks

Ellis

Accepted Solutions (0)

Answers (13)

Answers (13)

ellis355

30-03-2015

Hi - yes Iv'e tried in in several events inc 'Initialize' anbd 'Layout Ready', 'Doc Ready' - just cant seem to get it to work.

Here is the troublesome portion of the form, if you add some impact ratings the color will change, then save and close the form, reopen and the color formatting is lost

Dropbox - BIA Impacts for forum.pdf

Any help appreciated

Thanks

E

ellis355

26-03-2015

Thanks for your response

Unfortunately this was already checked on my form, I tried unchecking it but no joy - I'm stumped - any further advice?

mouslander

25-03-2015

I was finally able to get it to work. Try this:Go to Form Properties, Run-time Check the box that says Allow Automatic... That worked for me in my test.

Runtime options.JPG

ellis355

24-03-2015

Yes it's a regular drop down for the user to pick the severity of an issue, this is then bound to a value that is passed to the XML

Eg User selects 'Major" the box turns red and the bound value '3'  is passed to xml.

Is that what you mean? Can that cause problems?

Thx

E

ellis355

24-03-2015

Hi Thanks for the response, I don't have any data connection set up for this form it is purely stand alone, user enters data and I use the xml to inject into Excel.

Any ideas?

Thx

Ellis