At the beginning I would like to thank the creator of this module. For me it is one of the most anticipated additions to Drupal. It solve a lot of my problems! Thank you very much! ;)
Right now I'm building a page for restaurant with the possibility of ordering by phone. Orders are added by the employee.
I would like to give them the ability to quickly customer choose and automatically filling in the fields at checkout .

To achieve this, I created an additional Client Profile (using the module: Customer Profile Type UI) where I gathered all the necessary information. This profile will contain two fields : Telephone Number and Street. Let's call this profile: Information Profile.

Now I'm going to set the fields in the customer profile "Billing Information" which appears during checkout. ( store > Customer profiles> Profile types > Billing information> Fields). I add the field "entity reference", TargetType: Commerce Customer Profile, and choose "Information Profile".
Of course I also add fields: Telephone Number and Street.

So now during the checkout process there is new "entity reference" field referring to the profile "Information Profile" which should automaticly filled Telephone Number and Street when i select a different profile.

At the opening of checkout page I get the following error:

Notice: Undefined index: field_myfield in entityreference_autofill_field_attach_form() (line 129 of /home/(...)/sites/all/modules/entityreference_autofill/entityreference_autofill.module).
Notice: Undefined index: field_myfield in entityreference_autofill_field_attach_form() (line 130 of /home/(...)/sites/all/modules/entityreference_autofill/entityreference_autofill.module).

When I try to choose something from entity reference field i get this warning in popup:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /mysite/system/ajax
StatusText: Internal Server Error
ResponseText: 

I also tried to reference to User profile or Basic page, but the problem remains.

Comments

Kolo’s picture

Issue summary: View changes

  • Commit ce64419 on 7.x-1.x by jgullstr:
    Issue #2223065 by Kolo: Added initial support for nested forms.
    
jgullstr’s picture

Hi Kolo,

Thanks for your kind words and your report. I've reviewed the issue and the latest commit should hopefully solve these issues.

//Josef

jgullstr’s picture

Priority: Major » Normal
Status: Active » Needs review
Kolo’s picture

Thank you for the quick reply. I updated the module to newest dev, but unfortunately the problem persists:

Notice: Undefined index: field_myfield in entityreference_autofill_field_attach_form() (line 134 of /(...)/sites/all/modules/entityreference_autofill/entityreference_autofill.module).
Notice: Undefined index: field_myfield in entityreference_autofill_field_attach_form() (line 135 of /(...)/sites/all/modules/entityreference_autofill/entityreference_autofill.module).
jgullstr’s picture

Try downloading the newest dev again. The newest commit might not have been packaged when you updated, as that error is not possible any more. I checked that the newest is available now.

//Josef

Kolo’s picture

On clean instal it works perfect! Thank you!

jgullstr’s picture

Status: Needs review » Fixed

Great! Setting this to fixed then.

//Josef

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.