• Fabrik V4.4.1 is now available.

    This version corrects the Admin issue introduced by V4.4. V4.4.1 is available through the Joomla Updater or for download through your My Downloads area of our website.

    Turns out a code change intended for our 5.0dev branch inadvertantly got pushed to the 4.x branch (by me, duh!). The javascript structure in 5.0 will change considerably and part of that change took effect with the inadvertant code change.

    We have reverted the code change and released 4.4.1. V4.4 has been retracted.

    Sorry for any inconvenience.

  • A new version of Full Calendar is now available.

    See the details here

PHP validation Condition does not work on element's value

Status
Not open for further replies.

EricWebsite

Member
On Joomla 4.3.1, PHP 8.1.18, Cassiopeia template, Upgraded from J3,F3 > J4,F4, Fabrik 4 gamma3

Using the $data to set a simple Condition to only run the validation when there is text in the $data field, like:

return $data > '';

or

if (strlen($data) > 0) {
return true;
} else {
return false;
}

always returns false and the validation is not run. In Fabrik 3 this works.
 
Change components\com_fabrik\models\validation_rule.php line 155 to

$res = Php::Eval(['code' => $condition, 'vars'=>['formModel'=>$formModel, 'data'=>$data]]);
 
Status
Not open for further replies.
Back
Top