Highlighted

optional fields

Avatar

30-07-2008

Hi



I am using different xml files to populate pdf documents (using xsd). Does anyone know how I can (if possible) hide a standard field if there is no xml value for it? E.g. not show "Name" in the pdf if there is no name in the xml file?



Thankful for any help

Thomas

Replies

Highlighted

Avatar

06-08-2008

Hi thomas ,



Its possible using the property hidden . When u initialize the form object , just check if the value is null and set its property to hidden. If U had set the form content to "Flowed" then all the contents gets align accordingly.



Thanks,

SrPrabhu
Highlighted

Avatar

06-08-2008

node.presence = "hidden"



Its in javascript.



this is for ur reference.



Thanks

SRPrabhu
Highlighted

Avatar

07-08-2008

Thanks for your answer



When I choose hidden object, the value is not shown on the pdf - allthough the xml file has a proper element value
Highlighted

Avatar

07-08-2008

Hi Thomas,



I cudn't get exactly your problem. Anyway hav u checked if the form object's rawvalue is null ? I mean , only if the value is null U hav to set its property to hidden. Follow the sample code..



if(this.rawValue == null){

this.presence = "hidden"

}



Write this code in the initialize event of that form object.



Thanks ,

SrPrabhu
Highlighted

Avatar

13-08-2008

Hi



If i write this code the object (which is a reference number) gets the value "hidden" on the pdf. Instead the whole object should be hidden. If the reference object has an xml value of e.g. 12345 than the reference object should be shown on the pdf with this value. Hope this clarifies.



Thomas