pass a field from formbuilder to a udt

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
janvl
Power Poster
Power Poster
Posts: 949
Joined: Wed Aug 13, 2008 10:57 am

pass a field from formbuilder to a udt

Post by janvl »

Hi,

I have been trying to pass the value from a Formbuilder form inside a udt.

Like:
in the form i have a field - $fld60

I tried to pass this value as a parameter for UDT {convfdf2} like
{convfdf2 filename=$fld_60}

in the UDT
$filename = isset($params['filename']);

if i echo $filename i get a value of 1

I did read the manual on the webpage, searched in internet but i cannot find an answer.
I have "chained" forms from formbuiler where one can pass fieldvalues to a new form called in the confirmation, teh values get passed to the next form but i needed the value in the udt.

Regards,
Jan
janvl
Power Poster
Power Poster
Posts: 949
Joined: Wed Aug 13, 2008 10:57 am

[solved] Re: pass a field from formbuilder to a udt

Post by janvl »

Hello

i probably should have avoided to call parameter and variable the same name.

I used exactly this example with the difference that i named the parameter "txtname" then it worked.

Regards,
Jan
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: pass a field from formbuilder to a udt

Post by rotezecke »

$filename = isset($params['filename']);

if i echo $filename i get a value of 1
isset() returns a boolean. so the "1" just means that the value is set. usually used in if statements. probably better is empty()

Code: Select all

if(!empty($params['filename']))
{
  $filename = $params['filename'];
}
janvl
Power Poster
Power Poster
Posts: 949
Joined: Wed Aug 13, 2008 10:57 am

Re: pass a field from formbuilder to a udt

Post by janvl »

Thanks rotezecke

the filename is never empty because i produce it myself.

I have to extend the udt to convert the file from utf8 to iso8859-1. (the PDF's i got are iso8859-1)
Then merge this FDF-file with the proper PDF to a filled-out PDF that is send per mail.

Regards,
Jan
Post Reply

Return to “Modules/Add-Ons”