Report in this issue the field types and configurations that do not currently get populated when overwrite is disabled.
The current way this module determines if a form field has a value or not, is by sending the field's $form_state['input'] array to a recursive function that traverses the array looking for set values.
function _entityreference_autofill_field_has_input_value($field_input) {
if (is_array($field_input)) {
foreach ($field_input as $value) {
if (_entityreference_autofill_field_has_input_value($value)) {
return TRUE;
}
}
}
else {
return !empty($field_input);
}
}
Is there a better/more way to check that an arbitrary form field has an input value? Also, is there any situation where the current approach will not work, ie overwrite a field that already has a value or skip a field that has no input value?
Comments
Comment #1
jgullstr commentedComment #2
jgullstr commentedComment #3
jgullstr commentedAdded code.
Comment #4
jgullstr commentedChanged approach.
Comment #5
jgullstr commentedComment #6
jgullstr commentedComment #7
jgullstr commentedComment #9
jgullstr commentedI'll set this to "fixed" for now, latest commit should help solve this. Re-open if necessary.
Comment #11
kris77 commentedOverwrite only filled fields. If I have an empty field, that field is the previous value and do not clear.