I'm used Field collection to add content type as field with unlimited but i want to alter this form fields for adding #autocomplete_path on each field so i'm added the autocomplete for the first field as $form['field_1']['und']['0']['field_1']['und']['0']['value']['#autocomplete_path'] = 'admin/path/autocomplete';

when i add more field collection field i want to added the same autocomplete for the next fields any solution for this ? Thanks in advance!.

enter image description here


After one day search i'm found solution in https://api.drupal.org/api/examples/form_example!form_example_tutorial.inc/function/form_example_tutorial_9/7 this example adds default values so that when the form is rebuilt, the form will by default have the previously-entered values.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.