Skip to content
Browse files

Added form

- "peep_text", "secure", and "peep" elements
  • Loading branch information...
1 parent eccefed commit 1f62827d18e05ccfef5f5ef94f5a783f4865bf4e @weierophinney committed
Showing with 37 additions and 0 deletions.
  1. +37 −0 src/PhlyPeep/Model/PeepForm.php
View
37 src/PhlyPeep/Model/PeepForm.php
@@ -0,0 +1,37 @@
+<?php
+
+namespace PhlyPeep\Model;
+
+use Zend\Form\Element\Csrf as CsrfElement;
+use Zend\Form\Form;
+
+class PeepForm extends Form
+{
+ public function __construct($name = null)
+ {
+ parent::__construct($name);
+ $this->setupElements();
+ }
+
+ protected function setupElements()
+ {
+ $this->add(array(
+ 'name' => 'peep_text',
+ 'attributes' => array(
+ 'type' => 'textarea',
+ 'placeholder' => 'What are you thinking now?',
+ 'label' => "What's on your mind?",
+ ),
+ ));
+
+ $this->add(new CsrfElement('secure'));
+
+ $this->add(array(
+ 'name' => 'peep',
+ 'attributes' => array(
+ 'type' => 'submit',
+ 'value' => 'Peep!',
+ ),
+ ));
+ }
+}

0 comments on commit 1f62827

Please sign in to comment.
Something went wrong with that request. Please try again.