setView($view); $form->addDecorator('Description', array('escape' => false, 'placement' => 'PREPEND')); $form->setDescription('

Using belongsTo

'); $form->addElement('text', 'recipient', array( 'label' => 'Ship to', 'required' => true, 'belongsTo' => 'shipping', )); $form->addElement('text', 'address1', array( 'label' => 'Address 1', 'required' => true, 'belongsTo' => 'shipping[addresses]', // Different belongsTo )); $form->addElement('submit', 'submit', array( 'label' => 'Submit', )); if ($request->isPost()) { if ($form->isValid($request->getPost())) { echo 'Order placed, Thank you!'; } else { echo 'You have errors in your form, please check'; } } echo $form->render();