By Adam O. on Wednesday, 14 December 2016
Replies 6
Likes 0
Views 1K
Votes 0
Hi there,

I'm trying to load name from AUTOCOMPLETE field by:


echo $user->getFieldData('AUTOCOMPLETE-1');


but it loads me value instead of name

How can I load name of filled up field?

At now when I use echo to show it, I see eg. ["MY-FIELD-1"]

I'll be very grateful for your help!
Best regards!
Adam
There are some fields which are unique to the user's object and these fields are the core fields of a Joomla user attribute,

[gist]
<?php

echo $user->getName();
echo $user->getAvatar();
[/gist]

You can see a list of wide methods that can be invoked in /administrator/components/com_easysocial/includes/user/user.php

P/S: Do take note that since this is posted under the non supported thread and we are not obliged to reply posts on this category
·
Wednesday, 14 December 2016 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

thank you for your reply. I explored suggested file, and found getFieldData and getFieldValue as functions related with custom fields. But none of this doesn't shows me name from autocomplete custom field - it shows me only value.

In this two cases, it shows me on profile view ["OXFORD-SCHOOL"] instead of normal name Oxford.


echo $user->getFieldValue('AUTOCOMPLETE-SCHOOL');

echo $user->getFieldData('AUTOCOMPLETE-SCHOOL');


I know, that this category is not supported by you, but please... could you send me simple piece of code to change ["OXFORD-SCHOOL"] value to name of this autocomplete field?

In most cases with your tips I can change my code to correct, but in this case I can't find solution...

I'll be very grateful for your help.

Best regards!
Adam
·
Thursday, 15 December 2016 09:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark... please... I very need this information to show in profile header name of school which user graduated

I know, that this is not supported category, but as I see, you help other users in similar issues...

https://stackideas.com/forums/using-a-boolean-field-to-decide-if-something-should-display

I'll be very grateful for your help!
Best regards!
Adam
·
Sunday, 18 December 2016 08:40
·
0 Likes
·
0 Votes
·
0 Comments
·
To be honest, I do not understand what you are trying to achieve here and I certainly hope that you manage your expectations because our support does not include customization assistance.
·
Monday, 16 January 2017 23:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

I try to show the same field data, as on attached screenshot in Nazwa szkoły: view

So, below my cover photo should be "I Liceum Ogólnokształcące im. Kazimierza Wielkiego w Łęczycy" but at now it shows me "["LO-LECZYCA"]".

I checkend many times - in that case getFieldData and getFieldValue is not working - shows me the same incorrect data "["LO-LECZYCA"]"

I edited my first post in this thread and put credentials to my site.

Thank you for your help!
Best regards!
Adam
·
Wednesday, 29 March 2017 00:57
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post