By LAC Webadmin on Sunday, 17 August 2014
Replies 5
Likes 0
Views 0.9K
Votes 0
Hi Mark & Team,

I'm integrating JEvents RSVPro with EasySocial by making ES Custom Field available when creating RSVPro Registration fields. Can you give me a hint on how to call ES Custom Fields properly but with the ability to Edit or the field is showing the value (when available) just like when Editing a User Profile where you can see the value. I was able to do it in a way that I show the value but not able to edit.

For example, I create a RSVPRo registration form and I choose to use the Custom Fields Name (First Name and Last Name), and Address. When I go to the Registration Form, I will see my First Name and Last Name and Address fields already filled from ES Custom Fields. But I will be able to change the value say on Address. I was able to show the fields but I can't find the way to make it editable.

Thank you!

Jackson
Hello,

You will need to know the custom field code first in order for you to retrieve a field value. It's as simple as,


<?php
$my = Foundry::user();
echo $my->getFieldValue('CUSTOM_FIELD_CODE'):
·
Sunday, 17 August 2014 14:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Yes, I actually found that code somewhere in the theme or views. But I don't want to just simply get the Value and Show. I want to show the value but give the User the ability to Edit it as well just like they are editing their Profile. Is there a method that will wrap everything into a single call?

Thanks,

Jackson
·
Monday, 18 August 2014 01:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry but there are no shortcuts around this unfortunately.
·
Monday, 18 August 2014 01:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark, maybe I'm not asking it the right way.

I am asking for a way on how do I go about calling an ES fields inside another component. Not just to show the field and its value but also allow the user to Edit it. I am not asking you to teach me how to program it but rather just give me a hint since the API documentation is not complete yet. I believe the way to achieve this also involve a class/method call to Theme. That part is I can't wrap my brain around since I am calling it from another component.

Am I making sense to you?

Thanks!
·
Monday, 18 August 2014 13:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Jackson,

Hm, to be honest with you I am not really sure what you mean by "editing" but you basically need to link the edit link back to EasySocial edit profile page. Do you mean you want to allow user to edit it on the fly? If that's the case, you probably want to take a look at the file /components/com_easysocial/controllers/profile.php and look at the @save method.

Since we are dealing with quite a number of custom fields, there's actually no way to call a single field to process / save it. We normally do it via triggers to trigger all the fields when it's being saved.
·
Monday, 18 August 2014 15:38
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post