Author Topic: ZendFramework & creating views  (Read 542 times)

0 Members and 1 Guest are viewing this topic.

Offline starphpTopic starter

  • Enthusiast
  • Posts: 59
  • Gender: Male
    • View Profile
ZendFramework & creating views
« on: May 14, 2009, 12:22:35 AM »
Hello,

I need to create a complex form. Three drop down menus, values of drop downs are changed according to the selection of another menu.

Show or Hide options.

I tried with Zend_Form and I couldn't make it.. Can I create HTML form directly in the view page ? If so, how can I show the form with submitted values after page submission and has an validation error ?

And how can I validate the form ?

Please suggest any site where I can find an example..

Thank You Team

Offline shlumph

  • Enthusiast
  • Posts: 451
  • Gender: Male
    • View Profile
    • My Site
Re: ZendFramework & creating views
« Reply #1 on: May 15, 2009, 10:26:47 AM »
Yes, you can create the form directly on the view. The posted values will go right to the controller. Check the posted values for errors, and if there are errors - put them in an array. Then assign those errors to the view -
Code: [Select]
<?php
$this
->view->errors $errors
whether you think you can, or can't, you're right -HF
Visit my website or github