Page 1 of 1

New field in control user panel

Posted: 06 Aug 2013, 08:50
by seweryn
Hi,

I create new field in components/com_phocagallery/views/user/tmpl/default_uploadform.php
This is input with type text.
I wolud save this field in database, but I don't know how :idea:

Could you give me some advice which and where I should add new code?

Thanks in advance.

EDIT:

Ok, I got it!
After when I add new field in components/com_phocagallery/views/user/tmpl/default_uploadform.php
I add this code to components/com_phocagallery/controllers/user.php in function save:

Code: Select all

$post['longitude']  = JRequest::getVar( 'pglongitude', '', 'post', 'string', 0 );
$post['latitude']   = JRequest::getVar( 'pglatitude', '', 'post', 'string', 0 );
where 'longitude' is name of column in database and 'pglongitude' is name of input.

Enjoy!

Re: New field in control user panel

Posted: 12 Aug 2013, 17:44
by Jan
Hi, thank you for the guide.

Jan