Advertisement
mogaj

notice

May 31st, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. THE CODE
  2.  
  3. $this->addElement('text', 'name', array(
  4. 'label' => 'Name',
  5. 'required' => true,
  6. 'filters' => array('stringTrim'),
  7. 'validator' => array(
  8. array('validator' => 'StringLength', 'options' => array('max' => 32))
  9. )
  10. )
  11. );
  12. $this->addElement('text', 'duration', array(
  13. 'label' => 'Duration',
  14. 'required' => true,
  15. 'filters' => array('stringTrim'),
  16. 'validator' => array(
  17. array('validator' => 'StringLength', 'options' => array('max' => 32))
  18. )
  19. )
  20. );
  21. $this->addElement('text', 'price', array(
  22. 'label' => 'Price',
  23. 'required' => true,
  24. 'filters' => array('stringTrim'),
  25. 'validators' => array(
  26. array('validator' => 'StringLength', 'options' => array('max' => 10)),
  27. array('validator' => 'Regex', 'options' => array('pattern' => '/^[0-9]{1,7}(\.[0-9]{1,2})?$/'))
  28. )
  29. )
  30. );
  31.  
  32. $this->addElement('select', 'property_id', array(
  33. 'label' => 'Property: ',
  34. 'required' => true,
  35. 'filters' => array('StringTrim'),
  36. 'MultiOptions' => array('' => '--Select--') + $this->_properties,
  37. 'validators' => array(
  38. array('validator' => 'Digits'),
  39. array('validator' => 'InArray',
  40. 'options' => array(
  41. 'haystack' => array_keys($this->_properties)
  42. )
  43. )
  44. )
  45. ));
  46.  
  47.  
  48. $this->addElement('submit', 'submit1', array(
  49. 'label' => 'Save',
  50. 'ignore' => true
  51. ));
  52. ------------------------------------------------------------------
  53.  
  54. Notice: Array to string conversion in /home/auto-w24/public_html/projectnirvana/nirvana/library/Zend/View/Helper/HtmlElement.php on line 119 Notice: Array to string conversion in /home/auto-w24/public_html/projectnirvana/nirvana/library/Zend/View/Helper/HtmlElement.php on line 119
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement