Skip to Content Skip to Menu

Using a conditional in profile view but with private fields

  • maestroc
  • maestroc
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
9 years 9 months ago #258030 by maestroc
I have a field named cb_contactme that has two values, 1=no and 2=yes. If the member selects yes then it should display their phone number on their public profile so that they can be contacted. I have the phone numbers stored in another field (cb_phonenumber). I am using this code in the profile value area of the cb_contactme field:

[cb:if cb_contactme="2"]By Phone: [cb:userfield field="cb_phonenumber" /][/cb:if]

It is working correctly and pulling in the phone number. The problem is that I don't want the phone number to show up on the profile as its own separate entry for all users. If I set the cb_phonenumber field to not show up on a users profile then the phone number also stops showing up in the contactme spot. All I get in that case is the "By Phone:" part of the thing and no number afterward.

How do I make it so that the phone number can be seen only if the owner wants it to be?

Please Log in or Create an account to join the conversation.

  • maestroc
  • maestroc
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
9 years 9 months ago #258439 by maestroc
Sorry to bump but it's been a week and still need some assistance with this...

Please Log in or Create an account to join the conversation.

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
9 years 9 months ago #258440 by heyai
It might work if you put the phone number field in a tab that is in a profile position which is not displayed.

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

Please Log in or Create an account to join the conversation.

  • maestroc
  • maestroc
  • OFFLINE
  • Posts: 22
  • Thanks: 0
  • Karma: 0
9 years 9 months ago #258567 by maestroc
That worked. I created a new tab and assigned it to one of the Hidden In Profile slots.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum