The user form has a prefill but field where not applied as they should. So here is my patch in the next comment.

CommentFileSizeAuthor
#1 1450664-prefill-user-form.patch2.04 KBmatglas86
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

matglas86’s picture

Frans’s picture

Why do you force the field type to be a texfield?
$form['account'][$sync_with]['#type'] == 'textfield'
The value is probably text, but the field can be a textarea, checkboxes or even a list (think 'gender' for example).

I do think it can be complicated, so I agree with the alter functions you introduce, but I think that the forced field type has to go. The detection on the 'value' key was not perfect either, but left room for all kinds of field types.

matglas86’s picture

Status: Active » Needs work

So this needs work? Will do that... patch will come.

Frans’s picture

Status: Needs work » Needs review

Did a first fix on this.

I changed the alters to one alter call at the end of the function. I don't see why 2 alters for each field is needed (resources).

It is far from complete, but does its job already a lot better.

See also #1481574: Integration with feeds for some new insights.

dxx’s picture

Issue summary: View changes

No problems to report.
+1 for add the hook at the end.