Jump to content

Zend_Form date box


_tina_

Recommended Posts

Hi,

 

I am trying to add a date picker box to my form.  Does anybody know how to do this?

 

	$this->setMethod( 'post' );
	$this->setAttrib( 'id', 'admin_form_page' );
	$this->setAttrib('enctype', 'multipart/form-data');
	$elements['id'] = $this->createElement( 'hidden', 'id' );
	$elements['created'] = $this->createElement( 'hidden', 'created' );

		$elements['title'] = $this->createElement( 'text', 'title' )->setLabel('Title:');
	$elements['announce_pub'] = $this->createElement( 'select', 'announce_pub' )
		->setLabel('Type:')
		->setMultiOptions(array('announcement'=>'Announcement', 'publication'=>'Publication')); 		
	$elements['link'] = $this->createElement( 'select', 'link' )
		->setLabel('Link:')
		->setMultiOptions(array('' => '', 'Url'=>'Url', 'PDF'=>'PDF'));

	$elements['url'] = $this->createElement( 'text', 'url' )->setLabel('Url:');	
	$elements['pdf'] = $this->createElement( 'file', 'pdf' )->setLabel('PDF:');

	$elements['date'] = $this->createElement( 'text', 'date' )->setLabel('Date:');

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/181044-zend_form-date-box/
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.