Ajax field + Privacy + Tab

11 years 7 months ago #212583 by dotcom22
Ajax field + Privacy + Tab was created by dotcom22
hello

I installed the Ajax Core plugin and I created an ajax textarea field and attribute this field inside a specific tab. My goal is to allow user to insert some text directly in the textarea User Profile view without need to "edit profile".

This work great however I'm still able to edit textarea in "edit profile" mode and instead that, I would prefer hide the Tab. In fact I would like be logic in the manner of how users are supposed to edit their data. Sometime it can be confusing for users to know if data must be edited from Profile view or Edit view.

For example I have installed Profile Gallery plugin and Privacy plugin. Users must add their photo directly from Profile view but can not add photo in "edit mode" reason why I set Privacy for the Gallery Tab to "No front-end edit at all for that tab".

Now I would like do the same for the Tab where I published my Ajax textarea but this seem to not be possible because if I set Privacy for this Tab to "No front-end edit at all for that tab", user can't edit textarea in both profile view and edit mode.

I miss something ?

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

11 years 7 months ago - 11 years 7 months ago #212584 by krileon
Replied by krileon on topic Re: Ajax field + Privacy + Tab
You can't hide edit profile display of a field then have its function in CB Core Fields Ajax. It uses that same display for its ajax edit. Suppose best approach is to just hide it with CSS as it'd cause no harm if someone removed the CSS and edited it from profile. Example CSS as follows.
.cbEditProfile #cbfr_FEILDID {
    display: none;
}

Replace FIELDID with the actual id of your field. You can find this ID within your _comprofiler_fields database or by inspecting the field row with Chrome/Firebug for its id.


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.

11 years 7 months ago #212588 by dotcom22
Replied by dotcom22 on topic Re: Ajax field + Privacy + Tab
In fact the field is not restricted to be edited in "edit mode"...is the Tab where the field is published who is restricted.

So that mean I can use CSS for hide the Tab in "edit mode" ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

11 years 7 months ago #212591 by krileon
Replied by krileon on topic Re: Ajax field + Privacy + Tab
When you remove a tab it uses internal API to remove the fields associated with the tab (this is correct). So hiding a tab also hides all the fields on that tab. It's possible to hide a tab entirely with CSS, but it's significantly more difficult to do (tab titles don't have a specific class or ID and requires CSS3 usage).


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.

Moderators: beatnantkrileon
Time to create page: 0.248 seconds

Facebook Twitter LinkedIn