Passing parms to UDT

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
dmgd
Forum Members
Forum Members
Posts: 115
Joined: Tue Jun 06, 2006 1:10 pm
Location: TX

Passing parms to UDT

Post by dmgd »

Quick question.  Is there an easy way to pass ALL form vars to a UDT?

Now I am passing {UDT name=$name  ad1=$ad1 . . . var15=$var15}

Thanks Mark
Mark
NaN

Re: Passing parms to UDT

Post by NaN »

If you call your UDT like that : {UDT name=$name  ad1=$ad1 . . . var15=$var15} you will be able to access all these params by using the array $params in the php script of your UDT.
E.g.

Code: Select all


if(isset($params['name'])) {
         do something with that...
}

and so on.

The question is where do you get the variables $name, $ad1 etc. ?
dmgd
Forum Members
Forum Members
Posts: 115
Joined: Tue Jun 06, 2006 1:10 pm
Location: TX

Re: Passing parms to UDT

Post by dmgd »

I'm sorry I meant to say I was passing all my vars form FormBuilder to a UDT.

FormBuilder is calling the UDT in the Form Template after $fb_form_done == 1 and no errors.

Sorry  :-[
Mark
Mark
Post Reply

Return to “Developers Discussion”