private function interpretFieldsArray(&$input)
{
foreach ($input['fields'] as $fIndex => $field) {
if (isset($field['choices'])) {
foreach ($field['choices'] as $cIndex => $choice) {
$input['fields'][$fIndex]['choices'][$choice['value']] = $choice['key'];
unset($input['fields'][$fIndex]['choices'][$cIndex]);
}
}
if (array_get($field, 'formType') == '') {
unset($input['fields'][$fIndex]['formType']);
}
if (array_get($field, 'default') == '') {
unset($input['fields'][$fIndex]['default']);
}
if (array_get($field, 'label') == '') {
unset($input['fields'][$fIndex]['label']);
}
}
}