Jump to content

Archived

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

_tina_

Zend_Form date box

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.

Share this post


Link to post
Share on other sites

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