problem in element calc

Status
Not open for further replies.

afacuse

New Member
I need to record a field in the database consists of a concatenation of strings

What I do is generate a calc element.

$datos = {inscrpcion___canal} . ' en la region de ' . {inscrpcion___region} . ' en la ciudad de ' . {inscrpcion___ciudad};
return $datos;

when I save the form, the string is in the field then I'm going to use from another component.

sometimes does not work well.
 

Attachments

  • element calc.jpg
    element calc.jpg
    43 KB · Views: 197
You should always quote placeholders (to prevent php errors if field is empty):
$datos = '{inscrpcion___canal}' . ' en la region de ' . '{inscrpcion___region}' . ' en la ciudad de ' . '{inscrpcion___ciudad}';
 
  • Like
Reactions: rob
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top