Because I cannot find the button for adding a new post anymore (please help)elp), I just continue with this post.
I would like to achieve this:
A have a form and I added a php plugin. At the "Start of Form Submission" I want to update a row in another table. I think something is wrong in the where clause, because if I directly point to a value for 'user_id', it does work. This is my code:
$db = JFactory::getDbo();
$user_id_now = (int) $formModel->getElementData('test___user_id');
$query = $db->getQuery(true);
$query->update('controlpanel')->set('veld1 = ' . $db->quote('1'))->where('user_id = ' . (int) $user_id_now);
$db->setQuery($query);
$db->execute();
Can somebody explain what goes wrong here? I've already been testing with "$name = $formModel->formData['tablename___name'];" as well...