INCREASE THE NUMBER OF VALUES PER FIELD

Component ID

2810973

Component name

INCREASE THE NUMBER OF VALUES PER FIELD

Component type

theme

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

first of Create Custom module and add below code and get results


function <module>_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id) {
  // Increase the max cardinality to 20
  $range = drupal_map_assoc(range(1, 20));
  $new_options =  array(FIELD_CARDINALITY_UNLIMITED => t('Unlimited')) + $range;
 
  // Change the options
  $form['field']['cardinality']['#options'] = $new_options;
}