madnh / FPDM

FPDF Form filling script
10 stars 13 forks source link

Filling fileds in format name1[0].name2[0].name3[0].field1[0] not found #8

Open tinodesigns opened 2 months ago

tinodesigns commented 2 months ago

Hi there,

I have a form with filed names fo the following format: topmostSubform[0].CopyA[0].LeftCol[0].f1_5[0]

In fpdm I get the following error: FPDF-Merge Error: field topmostSubform[0].CopyA[0].LeftCol[0].f1_5[0] not found

is it not possible to have . and [] in the names of the fields?

It works great filling these out normally. but FPDM seems not to like them. How do I have to address them to make sure they are found. Are these subarrays? and how to use them in FPDM?

My currend fields array look like this:

$fields = array( 'test' => 'TEST0', 'topmostSubform[0].CopyA[0].LeftCol[0].f1_5[0]' => 'TEST1'

);

Worksfine for test. not when the topmostSubform[0].CopyA[0].LeftCol[0].f1_5[0] is added.

Thanks

tinodesigns commented 2 months ago

I was able to find the correct field name using the output from $pdf->verbose = true; $pdf->verbose_level = 4;

name of such a field woudl be f1_5[0]