[SOLVED] Contact form and fields in multiple tabs

12 years 1 month ago - 12 years 1 month ago #195146 by Pere LK
After reading some tutos I precise I want to render cb_fields for the profiles templates not for the current logged user.
For example I want to add the <h1>"Fiche de Mr $this->render('cb_name')</h1> in my template ;-)

Please Log in to join the conversation.

12 years 1 month ago - 12 years 1 month ago #195167 by krileon
You don't render fields directly in your template, but I suppose if you still need to you can prepare cbUser then use getField API. Please see below tutorial.

www.allmysocials.com/directory/tutorials/item/235-obtaining-field-values-through-api


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 1 month ago - 12 years 1 month ago #195175 by Pere LK
I have already read your tuto but it's for current logged user isn't it ?
I need to render some field on public profil ? Sorry if my explanation isn't good (I'm french)

And there is a method for overriding field rendering ?

Please Log in to join the conversation.

12 years 1 month ago #195185 by krileon
You can specify whatever userid you want. It's for any user that you have an id for. For example if you want the ID of the user viewing the profile you'd use $_CB_framework->myId();. Please review our API documentation in the free downloads section as well as the tutorials provided in my signature. All the API is highlighted there.

And there is a method for overriding field rendering ?

With API, yes. See CB Conditional or CB Privacy for example as it does just that acting on the trigger that obtains the fields array.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 1 month ago #195237 by Pere LK
I find a very easier way for templating after a print_r on $this objet ^^
$this->user->name that's all I need.

But the weird thing is that this object contain all the fields even if there are not enable for profil in in the field parameters. So it seems the SQL request you use for build the tabs is a select * you just filter the field on the render trigger ?

Please Log in to join the conversation.

12 years 1 month ago #195300 by krileon
You're accessing the direct user object. You need to use getFields API if you want permissions applied. Supply $this->user->id to the API I've provided and you can use getFields API to properly call a field that'll respect display permissions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: Pere LK

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.184 seconds

Facebook Twitter LinkedIn