Make form to show multiple field widgets with predefined values I have a node form with multivalue field (cardinality unlimited). I need to show user 3 widgets if this field with predefined value (like shown at screenshot).

At screenshots I show the current form, and its desired look.

How can I achieve this result?
You will probably need to build a custom module that calls hook_form_alter() or hook_form_FORM_ID_alter() and insert your required pre-filled values before the form is rendered.

Your function should look something like this:

&lt;?php

/*
 * Implements hook_form_FORM_ID_alter(&amp;$form, &amp;$form_state, $form_id)
 */
function mymodule_form_node_form_alter(&amp;$form, &amp;$form_state, $form_id){
    // Install devel module and uncomment below to see the variables in the form printed on the screen
    // dpm($form_state);

    // Once you know where to put the variables you can add new values to the field array like this
    $form_state['values']['field_something_important'][] = 'First thing';
    $form_state['values']['field_something_important'][] = 'Second thing';
    $form_state['values']['field_something_important'][] = 'Third thing';
}


Note that the actual location to put the values will be different, and might be a few levels deeper into $form_state.

As always when making modules:


Replace the 'hook' part of a function name with the module name (case sensitive)
Make sure you have the right form id in the hook
Clear your cache so Drupal can find the hook