src/PeskyCMF/Scaffold/Form/FormInput.php
public function setDisabledUntil($otherInput, $hasValue, $ignoreIfInputIsAbsent = false) {
        return $this->addDisablerConfig($otherInput, false, $hasValue, $ignoreIfInputIsAbsent, false);
    }
public function setDisabledUntil($otherInput, $hasValue, $ignoreIfInputIsAbsent = false) {
        return $this->addDisablerConfig($otherInput, false, $hasValue, $ignoreIfInputIsAbsent, false);
    }
This input should be disabled only when $otherInput has no provided value ($hasValue)
Note: can be called several times to add more conditions. Conditions will be preocessed "1 OR 2 OR 3..."
If any condition matches - input will be disabled
@param string $otherInput
@param mixed $hasValue
- bool: if $otherInput is checkbox/trigger |
- string or array: if $otherInput is select or radios
- regexp: custom regexp. MUST BE COMPATIBLE to javascript's regexp implementation
start & end delitmiter is '/'; must do exact matching using ^ and $
Example: "/^(val1|val2)$/", "/^([a-d][c-z])+/"
@param bool $ignoreIfInputIsAbsent
- true: if input is not present in form this condition will be ignored
- false: if input is not present in form this condition will write about this situation in browser's console and will not be used
@return $this
@throws \UnexpectedValueException
@throws \InvalidArgumentException
@throws \BadMethodCallException