0

I have a field collection named rmr_bar_li. I want to add a div to each line item of field collection, that is within field collection. How can I do that? Can any one help?

0

We need to write a hook_form_alter();
In my case ,

function mymodule_form_alter($form,$form_state,$form_id) {
  form['rmr_bar_li'][und][0]['anyfield']['#suffix'] = <div class = 'class name'></div>;
} 

Here anyfield is field inside the field collection below which you have to place your DIV tag.

| 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.