1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00
This commit is contained in:
Ryan Cramer
2021-08-02 14:12:06 -04:00
parent a4324c674c
commit a0fd1ce43e

View File

@@ -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");
} }
/** /**