Skip to content

Instantly share code, notes, and snippets.

@michael-romer
Created October 20, 2012 17:11
Show Gist options
  • Save michael-romer/3924051 to your computer and use it in GitHub Desktop.
Save michael-romer/3924051 to your computer and use it in GitHub Desktop.
Listing 16.24
<?php
namespace Helloworld\Form;
use Zend\Form\Fieldset;
class UserFieldset extends Fieldset
{
public function __construct()
{
parent::__construct('user');
$this->add(array(
'name' => 'name',
'attributes' => array(
'type' => 'text',
'id' => 'name'
),
'options' => array(
'id' => 'name',
'label' => 'Ihr Name:',
)
));
$this->add(array(
'name' => 'email',
'attributes' => array(
'type' => 'email',
),
'options' => array(
'id' => 'email',
'label' => 'Ihre E-Mail-Adresse:'
),
));
$this->add(array(
'type' => 'Helloworld\Form\UserAddressFieldset',
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment