add a field to admin file

Phoca Download - download manager
Pirosoft
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 08 Oct 2012, 16:46

add a field to admin file

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: add a field to admin file

Post by Jan »

Hi, check if there are no limits or restrictions by the editor :idea:

Jan
If you find Phoca extensions useful, please support the project
Pirosoft
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 08 Oct 2012, 16:46

Re: add a field to admin file

Post 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..
Post Reply