[TYPO3-english] Upload file extension tutorial
Victor Livakovsky
v-tyok at mail.ru
Mon Nov 22 13:40:29 CET 2010
Hi, Brian.
There is nothing special in creating upload forms.
> function displayUploadForm(){
> $content =
> $this->cObj->cObjGetSingle($this->conf['uploadformcObject'],$this->conf['uploadformcObject.']);
> $content = str_replace("###STATUS###",(empty($this->status) ? "" :
> array_pop($this->status)),$content);
> return $content;
> }
Form here is created by cObjGetSingle method, which creates a content by
parameters, passed in TS configuration of a plugin.
> $this->pi_getLL('submit_title_label').":|".$this->prefixId."[title]=input|".$this->pi_getLL('submit_input_field')."||
Your way is creation of a field from PHP, which is also good.
Another way is to use templates for a forms. You may find a good example of
it at 'powermail' extension. Have a look at
EXT:powermail/templates/tmpl_fieldwrap.html - a template for a fields - and
at EXT:powermail/pi1/class.tx_powermail_html.php - a code, that uses this
template.
Enjoy :)
More information about the TYPO3-english
mailing list