original_string: public function addMultiField($label = null, $meta = array())
      {
          $strName = (isset($meta["name"])) ? $meta["name"] : null;
          $objField = new MultiField($label, $meta, $strName);
  
          $objField->setRequiredStyle($this->__requiredstyle);
  
          // *** Fieldset already defined?
          $objFieldset = $this->__elements->getLast("ValidFormBuilder\\Fieldset");
          if ($this->__elements->count() == 0 || ! is_object($objFieldset)) {
              $objFieldset = $this->addFieldset();
          }
  
          $objField->setMeta("parent", $objFieldset, true);
  
          // *** Add field to the fieldset.
          $objFieldset->addField($objField);
  
          return $objField;
      }
code: public function addMultiField($label = null, $meta = array())
      {
          $strName = (isset($meta["name"])) ? $meta["name"] : null;
          $objField = new MultiField($label, $meta, $strName);
  
          $objField->setRequiredStyle($this->__requiredstyle);
  
          // *** Fieldset already defined?
          $objFieldset = $this->__elements->getLast("ValidFormBuilder\\Fieldset");
          if ($this->__elements->count() == 0 || ! is_object($objFieldset)) {
              $objFieldset = $this->addFieldset();
          }
  
          $objField->setMeta("parent", $objFieldset, true);
  
          // *** Add field to the fieldset.
          $objFieldset->addField($objField);
  
          return $objField;
      }
code_tokens: public function addMultiField ( $ label = null , $ meta = array ( ) ) { $ strName = ( isset ( $ meta [ "name" ] ) ) ? $ meta [ "name" ] : null ; $ objField = new MultiField ( $ label , $ meta , $ strName ) ; $ objField -> setRequiredStyle ( $ this -> __requiredstyle ) ; // *** Fieldset already defined? $ objFieldset = $ this -> __elements -> getLast ( "ValidFormBuilder\\Fieldset" ) ; if ( $ this -> __elements -> count ( ) == 0 || ! is_object ( $ objFieldset ) ) { $ objFieldset = $ this -> addFieldset ( ) ; } $ objField -> setMeta ( "parent" , $ objFieldset , true ) ; // *** Add field to the fieldset. $ objFieldset -> addField ( $ objField ) ; return $ objField ; }
docstring: Create a Multifield element
  
  Multifield elements allow you to combine multiple fields horizontally with one label.
  For example, create a first name + last name field with label "Full name"
  
  ```php
  $objMulti = $objForm->addMultifield("Full name");
  // Note: when using addField on a multifield, we don't set a label!
  $objMulti->addField(
  "first-name",
  ValidForm::VFORM_STRING,
  array(),
  array(),
  // Keep it short, this is just a first name field
  array("style" => "width: 50px")
  );
  $objMulti->addField("last-name", ValidForm::VFORM_STRING);
  ```
  
  You can also combine select elements to create a date picker:
  
  ```php
  $objMulti = $objForm->addMultiField("Birthdate");
  $objMulti->addField(
  "year",
  ValidForm::VFORM_SELECT_LIST,
  array(),
  array(),
  array(
  "start" => 1920,
  "end" => 2014,
  // 'fieldstyle' gets applied on the <select>
  // regular 'style' applies on the wrapping <div>
  "fieldstyle" => "width: 75px"
  )
  );
  $objMulti->addField(
  "month",
  ValidForm::VFORM_SELECT_LIST,
  array(),
  array(),
  array(
  "start" => 01,
  "end" => 12,
  "fieldstyle" => "width: 75px"
  )
  );
  $objMulti->addField(
  "day",
  ValidForm::VFORM_SELECT_LIST,
  array(),
  array(),
  array(
  "start" => 1,
  "end" => 31,
  "fieldstyle" => "width: 75px"
  )
  );
  ```
  
  @param string $label
  @param array $meta The meta array
  @return \ValidFormBuilder\MultiField
docstring_tokens: Create a Multifield element