New field in control user panel
Posted: 06 Aug 2013, 08:50
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
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:
where 'longitude' is name of column in database and 'pglongitude' is name of input.
Enjoy!
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
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 );
Enjoy!