This commit is contained in:
Roly Rudy Gutierrez Pinto
2016-03-09 17:43:06 -04:00
parent 93819b0a37
commit b7b05b872c

View File

@@ -38,15 +38,18 @@ class pmDynaform
} }
//todo: compatibility checkbox //todo: compatibility checkbox
$json = G::json_decode($this->record["DYN_CONTENT"]); if ($this->record !== null && isset($this->record["DYN_CONTENT"]) && $this->record["DYN_CONTENT"] !== "") {
$fields = $this->jsonsf2($json, "checkbox", "type"); $json = G::json_decode($this->record["DYN_CONTENT"]);
foreach ($fields as $field) { $fields = $this->jsonsf2($json, "checkbox", "type");
if (isset($field->dataType) && $field->dataType === "string") { foreach ($fields as $field) {
$field->type = "checkgroup"; if (isset($field->dataType) && $field->dataType === "string") {
$field->type = "checkgroup";
$field->dataType = "array";
}
$this->jsonReplace($json, $field->id, "id", $field);
} }
$this->jsonReplace($json, $field->id, "id", $field); $this->record["DYN_CONTENT"] = G::json_encode($json);
} }
$this->record["DYN_CONTENT"] = G::json_encode($json);
} }
public function getDynaformTitle($idDynaform) public function getDynaformTitle($idDynaform)