?
avatar zoell
zoell
1 Apr 2015

Steps to reproduce the issue

Add a custom field to the user registration and profile page. This select will gather all the countries in the world from a simple database table.

plugins/user/profile/profiles/profile.xml:
name="country2"
type="sql"
id="country2"
description="PLG_USER_PROFILE_FIELD_COUNTRY2_DESC"
filter="string"
key_field="id"
value_field="name"
label="PLG_USER_PROFILE_FIELD_COUNTRY2_LABEL"
query="SELECT id, name FROM countrylist ORDER by name"
/>

plugins/user/profile/profile.xml:
< field name="register-require_country2" type="list" description="PLG_USER_PROFILE_FIELD_COUNTRY2_DESC" label="PLG_USER_PROFILE_FIELD_COUNTRY2_LABEL"/>JOPTION_REQUIRED JOPTION_OPTIONAL JDISABLED </ field >

Expected result

1: When going to the user's profile page, the country name is displayed

Actual result

1: The country ID is displayed on the user's profile page instead of the name.

System information (as much as possible)

PHP Built On Linux ecws 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64
Database Version 5.6.19-log
Database Collation utf8_general_ci
PHP Version 5.5.9-1ubuntu4.7
Web Server nginx/1.6.2
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36

Additional comments

See attached screenshot.

avatar zoell zoell - open - 1 Apr 2015
avatar zoell zoell - change - 1 Apr 2015
Labels Removed: ?
avatar bertmert
bertmert - comment - 1 Apr 2015

Try

key_field="name"
value_field="name" 
avatar zoell
zoell - comment - 1 Apr 2015

Many thanks it worked.

avatar zoell zoell - change - 1 Apr 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-04-01 14:09:00
avatar zoell zoell - close - 1 Apr 2015
avatar zero-24 zero-24 - close - 1 Apr 2015
avatar zero-24 zero-24 - change - 1 Apr 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment