Page 1 of 1

add a field to admin file

Posted: 08 Oct 2012, 16:56
by Pirosoft
Hi,
i need to add a field do file admnistration view, i have change administrator/components/com_phocadownload/models/forms/phocadownloadfile.xml
and add the line:
<field name="mynote" id="mynote" type="editor" buttons="true" hide="pagebreak,readmore" class="inputbox" label="mynote" filter="safehtml" description="mynote" />

in administrator/components/com_phocadownload/views/phocadownloadfile/tmpl/edit.php
i have change the code:
$formArray2 = array('description', 'features', 'changelog', 'notes' );
foreach ($formArray2 as $value) {
echo $this->form->getLabel($value);
echo '<div class="clr"></div>';
echo $this->form->getInput($value);
}
in
$formArray2 = array('description', 'mynote', 'features', 'changelog', 'notes' );
foreach ($formArray2 as $value) {
echo $this->form->getLabel($value);
echo '<div class="clr"></div>';
echo $this->form->getInput($value);
}
and alter table jos_phocadownload adding a new column mynote (text like notes or description)
but if dministrator/components/com_phocadownload/models/forms/phocadownloadfile.xml the the is editor (type="editor") when i click save the browser ask me if i want live the page because the form is changed and i have no saved! (but it's work the changed are saved), if i have type="textarea" i not have this problem....
<field name="mynote" id="mynote" type="textarea" buttons="true" hide="pagebreak,readmore" class="inputbox" label="mynote" filter="safehtml" description="mynote" />

why? can you help me please?

thanks

Re: add a field to admin file

Posted: 11 Oct 2012, 22:32
by Jan
Hi, check if there are no limits or restrictions by the editor :idea:

Jan

Re: add a field to admin file

Posted: 12 Oct 2012, 11:46
by Pirosoft
The problem i s tinymce editor, if i disable a option in plugin don't give me more problem, i don't know why, maybe in creation form the author of phoca use params so don't give problem..