git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4095 a333f486-631f-4898-b8df-5754b55c2be0
@@ -28,5 +28,5 @@ use \Combodo\iTop\Form\Field\TextField;
*/
class HiddenField extends TextField
{
-
+ const DEFAULT_HIDDEN = true;
}
@@ -407,6 +407,25 @@ class Form
/**
+ * Returns true if the form has at least one editable field
+ *
+ * @return boolean
+ */
+ public function HasVisibleFields()
+ {
+ $bRet = false;
+ foreach ($this->aFields as $oField)
+ if (!$oField->GetHidden())
+ $bRet = true;
+ break;
+ }
+ return $bRet;
+
+ /**
* @param $sFormPath
* @return Form|null