This commit is contained in:
Roly Rudy Gutierrez Pinto
2016-12-19 11:10:51 -04:00
parent f7ae6a32c4
commit bb7d6c1a2e
2 changed files with 23 additions and 2 deletions

View File

@@ -196,7 +196,9 @@ class pmDynaform
if (is_string($value) && in_array(substr($value, 0, 2), $prefixs)) {
$triggerValue = substr($value, 2);
if (isset($this->fields["APP_DATA"][$triggerValue])) {
$json->{$key} = $this->fields["APP_DATA"][$triggerValue];
if ($key !== "dataVariable") {
$json->{$key} = $this->fields["APP_DATA"][$triggerValue];
}
} else {
$json->{$key} = "";
}
@@ -327,6 +329,18 @@ class pmDynaform
$json->optionsSql[] = $option;
}
}
if ($value === "suggest" && isset($json->queryField) && $json->queryField == true) {
$json->queryOutputData = array();
foreach ($json->optionsSql as $option) {
if ($json->queryFilter !== '') {
if (preg_match('/^.*' . $json->queryFilter . '.*$/i', $option->label)) {
$json->queryOutputData[] = $option;
}
} else {
$json->queryOutputData[] = $option;
}
}
}
}
}
//data