Using integer with multiple values in Form API I have an integer field on a node which can take two values. The nodes are created by the users by submitting a form. I can't work out how to do this for a multiple field text value. 

How do I set-up a textfield form element to take multiple values?
How do I then submit it into the node using an entity wrapper?

This is the form element.

function createnode_form($form, &amp;$form_state){    
    $form['field_student_age'] = array(
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('test'),
    ); .....


This is the code that creates the new node.

function postajob_form_submit($form, &amp;$form_state) {

  $entity = entity_create('node', $values);
  $ewrapper = entity_metadata_wrapper('node', $entity);

  $ewrapper-&gt;field_salary-&gt;set($form_state['values']['field_salary']);


There is no multiple property for textfields. Do I need to open up a different path in the form variable (e.g. $form['field_student_age']['value1'])? I've tried various options but I can't work out what the path would be.

If I do that, can I then just submit it in the wrapper with the extended path?
I got the solution from Save a new value with entity_metadata_wrapper to an entity field which is an array.

I created two separate form fields.

function createnode_form($form, &amp;$form_state){ 
  $form['field_student_age'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('test'),
  );

  $form['field_student_age2'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('test2'),
  );


Then I stored them using the first method in the post quoted above.

$ewrapper-&gt;field_student_age[] = $form_state['values']['field_student_age'];
$ewrapper-&gt;field_student_age[] = $form_state['values']['field_student_age2'];


Rather than using set as I'd done with single values, I created a new entry for each value using [] =.