How to override field collection field title? I have created field using field collection. I need to override field title and and incremented by 1 every field title. For this I am using this code. But its not working for me.

function previewcustom_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $x = 1;
  if($form_id =="article_node_form"){

  foreach($form['field_ingredientsf']['und'] as $k =&gt; $v) {

    if(is_numeric($k)) {

      $form['field_ingredientsf']['und'][$k]['field_steps']['und'][0]['#title'] = $form['field_ingredientsf']['und'][$k]['field_steps']['und'][0]['value']['#title'].' '.$x;
      $form['field_ingredientsf']['und'][$k]['field_steps']['und']['#title'] = $form['field_ingredientsf']['und'][$k]['field_steps']['und']['#title'].' '.$x;
      $x++;
    }
  }
}


Note I cleared the cache.
Maybe just a typo. It should be ['value']['#title'] = .... Also you'ld rather use LANGUAGE_NONE instead of 'und'.

$form['field_ingredientsf'][LANGUAGE_NONE][$k]['field_steps'][LANGUAGE_NONE][0]['value']['#title'] .= $x;