Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.