Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[LiveCycle Designer] Send Field Value with FDF Response

Dan_NY
Level 2
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?

0 Replies
jnicholas330
Level 7
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


Dan_NY
Level 2
Level 2

Yep. Yep. Thanks! Am I missing something?

Dan_NY
Level 2
Level 2

Above does not work. Any other suggestions?

jnicholas330
Level 7
Level 7

Did you change the JavaScript to update your fields?

Dan_NY
Level 2
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 ;