original_string: public static function renderField($name, $label, $type, $validationRules, $errorHandlers, $meta)
      {
          $objField = null;
          switch ($type) {
              case static::VFORM_STRING:
              case static::VFORM_WORD:
              case static::VFORM_EMAIL:
              case static::VFORM_URL:
              case static::VFORM_SIMPLEURL:
              case static::VFORM_CUSTOM:
              case static::VFORM_CURRENCY:
              case static::VFORM_DATE:
              case static::VFORM_NUMERIC:
              case static::VFORM_INTEGER:
                  $objField = new Text($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_PASSWORD:
                  $objField = new Password($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_HTML:
              case static::VFORM_CUSTOM_TEXT:
              case static::VFORM_TEXT:
                  $objField = new Textarea($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_FILE:
                  $objField = new File($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_BOOLEAN:
                  $objField = new Checkbox($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_RADIO_LIST:
              case static::VFORM_CHECK_LIST:
                  $objField = new Group($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_SELECT_LIST:
                  $objField = new Select($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_HIDDEN:
                  $objField = new Hidden($name, $type, $meta);
                  break;
              default:
                  $objField = new Element($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
          }
  
          return $objField;
      }
code: public static function renderField($name, $label, $type, $validationRules, $errorHandlers, $meta)
      {
          $objField = null;
          switch ($type) {
              case static::VFORM_STRING:
              case static::VFORM_WORD:
              case static::VFORM_EMAIL:
              case static::VFORM_URL:
              case static::VFORM_SIMPLEURL:
              case static::VFORM_CUSTOM:
              case static::VFORM_CURRENCY:
              case static::VFORM_DATE:
              case static::VFORM_NUMERIC:
              case static::VFORM_INTEGER:
                  $objField = new Text($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_PASSWORD:
                  $objField = new Password($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_HTML:
              case static::VFORM_CUSTOM_TEXT:
              case static::VFORM_TEXT:
                  $objField = new Textarea($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_FILE:
                  $objField = new File($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_BOOLEAN:
                  $objField = new Checkbox($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_RADIO_LIST:
              case static::VFORM_CHECK_LIST:
                  $objField = new Group($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_SELECT_LIST:
                  $objField = new Select($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
              case static::VFORM_HIDDEN:
                  $objField = new Hidden($name, $type, $meta);
                  break;
              default:
                  $objField = new Element($name, $type, $label, $validationRules, $errorHandlers, $meta);
                  break;
          }
  
          return $objField;
      }
code_tokens: public static function renderField ( $ name , $ label , $ type , $ validationRules , $ errorHandlers , $ meta ) { $ objField = null ; switch ( $ type ) { case static :: VFORM_STRING : case static :: VFORM_WORD : case static :: VFORM_EMAIL : case static :: VFORM_URL : case static :: VFORM_SIMPLEURL : case static :: VFORM_CUSTOM : case static :: VFORM_CURRENCY : case static :: VFORM_DATE : case static :: VFORM_NUMERIC : case static :: VFORM_INTEGER : $ objField = new Text ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_PASSWORD : $ objField = new Password ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_HTML : case static :: VFORM_CUSTOM_TEXT : case static :: VFORM_TEXT : $ objField = new Textarea ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_FILE : $ objField = new File ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_BOOLEAN : $ objField = new Checkbox ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_RADIO_LIST : case static :: VFORM_CHECK_LIST : $ objField = new Group ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_SELECT_LIST : $ objField = new Select ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; case static :: VFORM_HIDDEN : $ objField = new Hidden ( $ name , $ type , $ meta ) ; break ; default : $ objField = new Element ( $ name , $ type , $ label , $ validationRules , $ errorHandlers , $ meta ) ; break ; } return $ objField ; }
docstring: Use this utility method to only render \ValidFormBuilder\Element instances of the defined types.
  
  Elements rendered with this method aren't added to the internal elements collection.
  
  @param string $name The element's name
  @param string $label The element's label
  @param integer $type The element's validation type
  @param array $validationRules Optional.Custom validation rules array
  @param array $errorHandlers Custom error handling array
  @param array $meta Optional. Meta data array
  
  @return \ValidFormBuilder\Element Returns null when no valid type is defined
docstring_tokens: Use this utility method to only render \ ValidFormBuilder \ Element instances of the defined types .