Eugene
Eugene

Reputation: 1

strange class with nested {} (PHP)

this code is originally from Joomla! custom form. All i want is to get the caption on the field and its body variables to put them in an email. I did var_dump($form) and was surprised with what i saw:

stdClass Object ( [FormId] => 10 [FormName] => contacts [FormLayout] =>{global:formtitle}{error}{name:caption}*{name:body}{name:validation}{name:description}{message:caption}*{message:body}{message:validation}{message:description}{email:caption}*{email:body}{email:validation}{email:description}{Send:caption}{Send:body}{Send:validation{Send:description}]

can anyone tell me how should i access those variables? (eg.{name:caption} {name:body})

Thanks in advance.

Upvotes: 0

Views: 73

Answers (2)

Pekka
Pekka

Reputation: 449415

That is a normal string containing template variables of some sort.

You would have to parse $object->FormLayout using the correct method - it can probably be found inside Joomla's code somewhere.

Upvotes: 2

Cybercartel
Cybercartel

Reputation: 12592

This is a php object and cannot be accessed like an array $array["FormLayout"]

Upvotes: 0

Related Questions