Page 1 of 1

Front end upload: select category by default

Posted: 24 Nov 2016, 12:26
by pat01
Hello

In the front end upload the user must select one category from the select menu.

Since I have one category only, I want this one to be the default category, so the user must not select it.
How can I do this?

Reason for this: Some user select the file first or add a description first. If the user then selects the category after, Phoca Download reloads the page and clears all data entered by the user! I want to avoid this by having a category selected by default an then hide the select field with display: none.

Joomla 3.6.4, PD 3.1.2

Thank you.

Regards
Patrick

Re: Front end upload: select category by default

Posted: 28 Nov 2016, 22:52
by Jan
Hi, this needs to be customized, directly in the code:

components\com_phocadownload\views\user\tmpl\default_files.php

Code: Select all

<?php echo $this->listsfiles['catid'] ?>
components\com_phocadownload\views\user\view.html.php

Code: Select all

$lists_files['catid'] = PhocaDownloadCategory::filterCategory($query, $catid_files, TRUE, TRUE, TRUE);
administrator\components\com_phocadownload\libraries\phocadownload\category\category.php

Code: Select all

public static function filterCategory()

Jan

Re: Front end upload: select category by default

Posted: 29 Nov 2016, 09:25
by pat01
Thank you!

Re: Front end upload: select category by default

Posted: 05 Dec 2016, 02:05
by Jan
Ok