-2

i have added a custom field in user profile.It's Optional for admin to let users see this field from back end.Problem is when admin removes this field,its description still shows.Is there any way to remove this when we remove this field?

thanks :)

Maninderpreet Singh
  • 2,569
  • 2
  • 17
  • 31
Vivek Choudhary
  • 634
  • 8
  • 14
  • can you post some code, which will describe your problem? – pes502 Mar 10 '16 at 13:07
  • another way, is there any way to remove field description with out removing the input field? 'This field can be seen by: Everyone Change' – Vivek Choudhary Mar 10 '16 at 13:09
  • 2
    it's very hard to help you, if I don't know, how the field description is showed and how your "remove" algorithm working – pes502 Mar 10 '16 at 13:10
  • I'm really sorry for my english sir.whenever i remove a custom field,the field description still shows there like "This field can be seen by: Everyone Change". so is there any way to remove this ? like any buddypress action/filter? thank you for quick reply. – Vivek Choudhary Mar 10 '16 at 13:15

1 Answers1

-1

You can set a flag like 'show' as radio button in the backend and let the admin set it. If the flag is set then only show it on front end else dont.

Kirk Beard
  • 9,569
  • 12
  • 43
  • 47
  • At back end admin have a check box.I'm doing like if(checkbox value == yes){ $fields['field_name'] = 'function_name_here'; }so in this way , field vanishes but 'This field can be seen by: Everyone Change' keeps showing. thanks for the help :) – Vivek Choudhary Mar 10 '16 at 13:29
  • can you please put your code here so that i can help you in a better way. – Prashant Rajput Mar 10 '16 at 13:31