Jump to content

Zend Forms


Skinner2001

Recommended Posts

Under a "forms" folder, create a model that extends Zend_Form, override the init function for adding elements

 

class Something_Form_Login extends Zend_Form
{
public function init()
{
	$Username = new Zend_Form_Element_Text('Username');
	$Username->setLabel('Username');

	$Password = new Zend_Form_Element_Password('Password');
	$Password->setLabel('Password');

	$Submit = new Zend_Form_Element_Submit('Submit');

	$this->addElements(array($Username, $Password, $Submit));
}
}

Link to comment
https://forums.phpfreaks.com/topic/254882-zend-forms/#findComment-1307131
Share on other sites

Great thanks for the help.

 

Where I need it is: I have 3 new links to different forms and need these links to go to the 3 different forms pages.

If I give you the URL it is: http://www.weddingtalk.co.uk/index/add-listing/

Now the 4 boxes on the right numbered 1 - 4 go to forms. Number 1 works fine but if I am to

add 3 new forms for 2, 3 & 4 I need to figure out what type is, and trawling through the code just makes me more confused...

Link to comment
https://forums.phpfreaks.com/topic/254882-zend-forms/#findComment-1307210
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.