CodeIgniter Forums
zend_form integration - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: zend_form integration (/thread-19171.html)



zend_form integration - El Forum - 05-30-2009

[eluser]dxrsm[/eluser]
I need to create an administration module for my data model.

I think that CI lacks a Form Library, which would enable us to quickly create admin forms for the models.

With a form library it would be easy to build a code generation tool for form classes.
These generated classes could then be rendered to a template. Something like what symfony does but without all the bloat.

Has anyone tried to use Zend_Form component with codeigniter?

If so, what are the zend components required to work with zend_form and how could they work along with CI??

Thanks


zend_form integration - El Forum - 05-30-2009

[eluser]TheFuzzy0ne[/eluser]
No, but I see no reason why just about of the Zend modules should not work with CodeIgniter. I'm using Zend_Search_Lucene, and I've heard of someone else using the Zend ACL library. It's just a case of including the right file and making sure you're paths are correct.


zend_form integration - El Forum - 05-30-2009

[eluser]Greg Aker[/eluser]
It should work for you. Depending on how you set your include path, all you need to do is:

Code:
<?php

require_once 'Zend/Form.php';

$form = new Zend_Form;
$form->setAction('my/form')
     ->setMethod('post');

// etc
?>

-greg