Skip to content
Snippets Groups Projects
Commit ffc0ea23 authored by Peter Rotich's avatar Peter Rotich
Browse files

Allow visibility without constraints

parent 1aaa3139
No related branches found
No related tags found
No related merge requests found
......@@ -3810,6 +3810,10 @@ class VisibilityConstraint {
}
function emitJavascript($field) {
if (!$this->constraint->constraints)
return;
$func = 'recheck';
$form = $field->getForm();
?>
......@@ -3851,6 +3855,12 @@ class VisibilityConstraint {
* Determines if the field was visible when the form was submitted
*/
function isVisible($field) {
// Assume initial visibility if constraint is not provided.
if (!$this->constraint->constraints)
return $this->initial == self::VISIBLE;
return $this->compileQPhp($this->constraint, $field);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment