I create a content type which contains a field_collection.

The default look of field_collection in node edit form is not suite my need,so I have to theme it.but I hadn't find any document for such situation.

in a node edit form, field_collection seen to use js to add or delete item,not the ajax way of D7.and field_collection edit form seen to have no form-id, which may be used for theme form.

so there is a way to do this? or any code example to demonstrate it?

Comments

sevanden’s picture

Same issue here:

A date field that collects an end-date is displayed using multiple lines on the edit form.
Not exactly what I wand and I wonder how to change that.

felgharb’s picture

Same issue here,
I dont know if you got a solution, if yes I would be interested on that.

I am trying to theme a field item collection and still cannot render the object entity...
Do you know how to render the [#entity] in the $form ?

Senpai’s picture

Priority: Major » Normal

Can't see that this is a 'major' issue for a release blocker.

jmuzz’s picture

Issue summary: View changes
Status: Active » Fixed

field_collection seen to use js to add or delete item,not the ajax way of D7.

Not sure what the situation was when this was written but there are no javascript files in the module and it does use the built in ajax in the form API.

To change how the form appears you will need to make a custom widget for field collections. Take a look at the field_collection_table module and the widget code in field_collection for examples.

Hope this helps.

Status: Fixed » Closed (fixed)

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