Page 1 of 1

form send to UDT

Posted: Thu Sep 10, 2009 9:03 am
by smotsie
Hi guys,

I am trying to get a form to submit it's contents to a UDT. I have the latest CMSMS and FormBuilder 0.5.12. I have used one of the sample forms, and replaced the "sendit via email" field with a "send to UDT" field and specified my UDT "formtest"

This UDT was complex, but I have reduced it to print "hello"; - can't get much simpler than that! (it works if I just include it in a smarty tagĀ  ;) )
When I submit my form, I get an error:

Code: Select all

Catchable fatal error: Object of class fbForm could not be converted to string in /var/www/appleam/lib/classes/class.usertagoperations.inc.php(158) : eval()'d code on line 3
Any ideas on how to solve this? line 158 of that file is deep in PHP beyond me

TIA
Smotsie

Re: form send to UDT

Posted: Thu Oct 22, 2009 4:30 pm
by scooper
Just been doing this myself. After a bit of poking around it seems that the form fields get passed as parameters to the UDT. You can access them using $params['Fieldname']

For example I'm just doing a form which has a 'Your Name' and a 'Your Email' field which I'm referencing as:

Code: Select all

$yourname=$params['Your Name'] ;
$youremail= $params['Your Email'];