How do I change cardinality (delta) of nodes? I have a content type, this content type has a Field Collection with cardinality(delta) value 1.


I want to alter it dynamically, when the node add form is rendered. 
Each node add form has it different cardinality(delta) value.


Please any one help me to solve it in Drupal 7.
You can use form_alter hook to do it:

/**
 * Implements hook_form_alter().
 */
function your_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'article_node_form') {
    // Alter your field here:
    // $form['field_collection'][LANGUAGE_NONE][0]['value'];
  }
}


To debug form output, you can install Devel module and use dpm() function.

/**
 * Implements hook_form_alter().
 */
function your_module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  dpm($form);
}