From 10d03344a80b75ea6f44340151a1db50e91930ab Mon Sep 17 00:00:00 2001 From: magnolia61 Date: Mon, 10 Dec 2018 10:11:46 +0100 Subject: [PATCH] disable also empty fields --- noverwrite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noverwrite.php b/noverwrite.php index 9d57a71..818ba9f 100644 --- a/noverwrite.php +++ b/noverwrite.php @@ -30,7 +30,7 @@ function noverwrite_civicrm_buildForm ( $formName, &$form ){ continue; } $field=$form->getElement($f); - if ($field && $field->_attributes["value"]) + if ($field) $form->freeze( $f ); } // if you want to bloc it at the js level only, uncomment the next line and comment out the freeze