A sample form with 2 file upload button in socialengine

<?php
class Iriswidgetbox_Form_Index extends Engine_Form {
public function init() {
$this -> setTitle(‘Upload New Video’) -> setAttrib(‘id’, ‘form-upload’) -> setAttrib(‘name’, ‘avp_create’) -> setAttrib(‘enctype’, ‘multipart/form-data’);

$video_file = new Zend_Form_Element_File(‘video_path’);
$video_file -> setLabel(‘Video File Path’) -> setRequired(true) -> setDestination(‘uploads/’);
$photo_file = new Zend_Form_Element_File(‘photo_path’);
$photo_file -> setLabel(‘AD Photo File Path’) -> setRequired(true) -> setDestination(‘uploads/’);
$photo_url = new Zend_Form_Element_Text(‘url’);
$photo_url -> setLabel(“Link of photo with starting http://&#8221;);
// creating object for submit button
$submit = new Zend_Form_Element_Submit(‘submit’);
$submit -> setLabel(‘Upload Files’) -> setAttrib(‘id’, ‘submitbutton’);

// adding elements to form Object
$this -> addElements(array($video_file, $photo_file, $photo_url, $submit));
}

}

Advertisements

One thought on “A sample form with 2 file upload button in socialengine

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s