• Joomla 5.1

    For running J!5.1 you must install Fabrik 4.1
    See also Announcements

  • Subscription and download (Fabrik 4.1 for J!4.2+ and J!5.1) are working now

    See Announcement
    Please post subscription questions and issues here

    We have resolved the issue with the J! updater and this will be fixed in the next release.

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.
Back
Top