mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 02:04:35 +02:00
Fix issue processwire/processwire-issues#890
This commit is contained in:
@@ -263,9 +263,14 @@ class InputfieldForm extends InputfieldWrapper {
|
|||||||
|
|
||||||
if($savedChildren[$name]->getSetting('showIfSkipped')) {
|
if($savedChildren[$name]->getSetting('showIfSkipped')) {
|
||||||
// dependency $field does not need to be processed, so neither does this field
|
// dependency $field does not need to be processed, so neither does this field
|
||||||
unset($delayedChildren[$child->name]);
|
list($val, $op) = array($selector->value, $selector->operator);
|
||||||
$processNow = false;
|
if(($op === '!=' && $val) || $op === '=' && empty($val)) {
|
||||||
if(self::debug) $this->debugNote("Removing field '$child->name' because '$name' it not shown.");
|
// allow it through to match non-presence (via issue #890)
|
||||||
|
} else {
|
||||||
|
unset($delayedChildren[$child->name]);
|
||||||
|
$processNow = false;
|
||||||
|
if(self::debug) $this->debugNote("Removing field '$child->name' because '$name' it not shown.");
|
||||||
|
}
|
||||||
|
|
||||||
} else if(!$savedChildren[$name]->getSetting('showIfProcessed')) {
|
} else if(!$savedChildren[$name]->getSetting('showIfProcessed')) {
|
||||||
// dependency $field is another one in $delayedChildren, send it back to the end
|
// dependency $field is another one in $delayedChildren, send it back to the end
|
||||||
@@ -585,7 +590,8 @@ class InputfieldForm extends InputfieldWrapper {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected function debugNote($note) {
|
protected function debugNote($note) {
|
||||||
if(self::debug) $this->message($note);
|
static $n = 0;
|
||||||
|
if(self::debug) $this->message((++$n) . ". $note");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user