Expand my Community achievements bar.

[LiveCycle Designer] Send Field Value with FDF Response

Avatar

Level 2

Hiya. I'm trying to send two FDF responses, a status message and a field/pair value, from a PHP script that has processed a HTTP POST. The status message is sent to the form successfully, but the field value is not sent to a form created in LiveCycle Designer (ES4 Version 11). Here's what I have:



<?php


header('Content-type: application/vnd.fdf');


// read and store the data however you want


// reply with some FDF data


echo <<<RESPONSE


%FDF-1.2


1 0 obj


<< /FDF <<


/Status (Wham bam! Journal data sent electronically. Save a copy of this PDF for your records.)


/Fields [ <</T(batchnum)/V(testt)>> ]


>>


>>


endobj


trailer


<< /Root 1 0 R >>


%%EOF


RESPONSE;


?>


<?php



I think I have tried the gamut, removed "!", "copy", "for" from the status message; adding quotes, single and double, as well as ``; spacing; changing and verifying field names; send only the /Status and sending only /Fields (btw no errors while is still not sent); and on. Additionally, the above PHP code works perfectly, sending both status and fields, on a form created in Acrobat Pro XI. But no success in LiveCycle where I need the form created to dynamically manage rows and such. Ideas? Anyone?

7 Replies

Avatar

Level 7

It looks like the FDF you've written was designed for an AcroForm. You can still use a FDF on a XFA form, but it has to be done a bit differently. Use JavaScipt inside the FDF to set your fields. E.g.:


%FDF-1.2


1 0 obj


<<


/FDF


<<


/JavaScript << /After (FieldIWantTomodify.rawValue = ("My new value");) >>


>>


>>


endobj


trailer


<<


/Root 1 0 R


>>


%%EOF


Avatar

Level 2

Yep. Yep. Thanks! Am I missing something?

Avatar

Level 2

Above does not work. Any other suggestions?

Avatar

Level 7

Did you change the JavaScript to update your fields?

Avatar

Level 2

Replaced my code with yours and updated with my fieldname. Tried formatting field name various ways. No luck. assort error codes include  field name not defined, expecting ;