georgie
Member
Hello
As said in the title, I wish after saving a form, to execute a code that modifies values ??of the record.
I do it already in the same form with condition like "equal to" (==) or "different" (! =). It works very well.
Yes, but now I want to say "that contains" !!! Arf
I put here a complete example of my script that work :
And here script wich does not work :
As said in the title, I wish after saving a form, to execute a code that modifies values ??of the record.
I do it already in the same form with condition like "equal to" (==) or "different" (! =). It works very well.
Yes, but now I want to say "that contains" !!! Arf
I put here a complete example of my script that work :
Code:
$variable1 = $formModel->formData['projets___type'];
if ($variable1 != 'Projet ROHM')
{
$formModel->updateFormData('projets___budget_rohm', '0' , true);
}
And here script wich does not work :
Code:
$variable2 = $formModel->formData['projets___ohm'];
$cherche = 'Oyapock';
if (strpos($variable2, $cherche) === false)
{
$formModel->updateFormData('projets___budget_oya', '0' , true);
}