Skip to content
Snippets Groups Projects
Commit 96b4d7f8 authored by simon.hermann's avatar simon.hermann
Browse files

Fixed an error with settings the defaults in ConditionallyMapStrings.

parent c243fb2d
No related branches found
No related tags found
1 merge request!117Fixed an error with settings the defaults in ConditionallyMapStrings.
......@@ -34,19 +34,20 @@ class ConditionallyMapStrings extends AbstractSimpleFieldOutputHandler {
// set the default values
if (isset($field['configuration'])) {
$configuration = $field['configuration'];
$defaults = array();
for ($i = 1; $i < $this->dataFields; ++$i) {
if (isset($configuration["condition_{$i}"])) {
$this->defaults["condition_{$i}"] = $configuration["condition_{$i}"];
$defaults["condition_{$i}"] = $configuration["condition_{$i}"];
}
if (isset($configuration["replacement_{$i}"])) {
$this->defaults["replacement_{$i}"] = $configuration["replacement_{$i}"];
$defaults["replacement_{$i}"] = $configuration["replacement_{$i}"];
}
}
if (isset($configuration['default'])) {
$this->defaults['default'] = $configuration['default'];
$defaults['default'] = $configuration['default'];
}
$form->setDefaults($this->defaults);
$form->setDefaults($defaults);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment