wuschel_lux
Member
Hi all,
I have a strange behaviour in a form using Joomla 4.4.0 and Fabrik 4.0 Zeta on PHP 8.2.12.
The form is writing with a PHP Form Plugin some data after some calculations to a db table. This part works as it should. In e second step an e-mail with a php template is send as confirmation to the customer.
The form is in principal a set of elements:
- Event (databasejoin where event_id is stored)
- Name
- E-Mail
- ...
The form is accessed by a URL with a pre-filled value for the EVENT dropdown field:
/inscription-event?inscription_event___event_raw=111
The error occurs only if I change the Event in the dropdown afterwards, so right ID is stored in the db but wrong ID (here the ID in the URL) is send out via e-mail.
E.g.
- called URL /inscription-event?inscription_event___event_raw=111
- dropdown changed to ID 222
- Event value in DB 222
- Event value in mail 111
Code in form php plugin to get event ID
// get course ID
$courseID = $formModel->getElementData('inscription_event___event', true);
$courseID = is_array($courseID) ? $courseID[0] : $courseID;
Code in e-mail template
$coursName = $this->data['inscription_event___event'];
or placeholder {inscription_event___event}
both will give the wrong value.
Hope anyone has an idea, what I did wrong.
Thanks and br
I have a strange behaviour in a form using Joomla 4.4.0 and Fabrik 4.0 Zeta on PHP 8.2.12.
The form is writing with a PHP Form Plugin some data after some calculations to a db table. This part works as it should. In e second step an e-mail with a php template is send as confirmation to the customer.
The form is in principal a set of elements:
- Event (databasejoin where event_id is stored)
- Name
- ...
The form is accessed by a URL with a pre-filled value for the EVENT dropdown field:
/inscription-event?inscription_event___event_raw=111
The error occurs only if I change the Event in the dropdown afterwards, so right ID is stored in the db but wrong ID (here the ID in the URL) is send out via e-mail.
E.g.
- called URL /inscription-event?inscription_event___event_raw=111
- dropdown changed to ID 222
- Event value in DB 222
- Event value in mail 111
Code in form php plugin to get event ID
// get course ID
$courseID = $formModel->getElementData('inscription_event___event', true);
$courseID = is_array($courseID) ? $courseID[0] : $courseID;
Code in e-mail template
$coursName = $this->data['inscription_event___event'];
or placeholder {inscription_event___event}
both will give the wrong value.
Hope anyone has an idea, what I did wrong.
Thanks and br