TextArea in Admin – not working?

This topic contains 10 replies, has 4 voices, and was last updated by  jahusdtc 6 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #427447

    jahusdtc
    Expired Member
    Post count: 162

    I have a fieldset and under the fieldset is a Textarea (plus other custom fields).
    I have set the Textarea (and other fields) as “Is Active” and “For Admin Only”

    Both fieldset and the Textarea (plus other fields) show on all price packages and on Details Page Own Tab.

    All these fields are to be private to only administrator.

    1. On Edit/Add Listing page…ALL show properly.
    2. On Details page, the “private” tab shows properly only for admin.
    The two other customer fields – radio boxes — also show properly on the “private” tab.
    BUT…the Textarea does not.

    Any ideas? Or…could you take a quick look and give me an idea what I’m doing wrong? Can’t figure out the problem! (Which may be PICNIC – person in chair not in computer!)

    #427449

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    #427655

    Alex Rollin
    Moderator
    Post count: 27815

    Hello! Please forgive my previous post; I think I tricked my own eyes.

    GD does offer an “Admin Only” field, but this field is not hidden from the front end. Admin only fields are only editable by the Admin (administrator), but their contents are not subject to visibility restrictions by role or otherwise.

    We had a discussion the other day on the forum talking about how membership plugins can be used for role visibility, you can see that here: https://wpgeodirectory.com/support/topic/i-want-to-restrict-s2-member-access-to-a-specific-tab/#post-427397

    #427673

    Guust
    Moderator
    Post count: 29970

    Make sure you remove the field from the frontend by selecting nothing at “Show in what locations?” if you do not want your users to see the custom fields.

    #427740

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    #427745

    jahusdtc
    Expired Member
    Post count: 162
    This reply has been marked as private.
    #427748

    Alex Rollin
    Moderator
    Post count: 27815

    Admin only fields are not ‘private’ fields in the sense of being hidden on the Detail page display. Admin
    only fields work as described here: https://wpgeodirectory.com/docs/core-place-settings/#custom

    For Admin use only?
    Choosing YES here, will not allow your users to edit the field; only administrators will be able to edit this field.
    This option is only available for custom fields you create yourself, not for the default GD fields.

    We certainly take another look to find out why the text field is not displaying on the front end, but that seems contrary to your stated goal?

    #428342

    jahusdtc
    Expired Member
    Post count: 162

    Hey, Alex…sorry for delayed response. Thanks…you had the answer. (As did Guust! But I wanted to leave the info on the FrontEnd for my Admin, while hiding it from the non-admin, so went the longer route. Was I correct?)

    Just wanted to tell “somebody” what I found that worked.

    Gotta say: “Admin Only” sounds like….”Admin Only.” Maybe needs a little help tooltip on that field in addition to your documentation elsewhere? Saying that Admin Only would be seen by EVERYONE…just in case they didn’t pick up on that themselves? Just a thought. Some things are “private.”

    2 points:
    1. I found my “missing” textarea field that said Admin Only — only showed on front side of Details page — when there was something in the field!

    The radiobuttons in the fieldset showed because they HAD a default value. The textarea had no default value, was blank…so why show? Took me a while to figure that one out!

    2. The link to the following indeed gave me the code-only answer to hiding for particular users or role: https://wpgeodirectory.com/support/topic/i-want-to-restrict-s2-member-access-to-a-specific-tab/#post-427397

    3. If someone wants a CSS solution (pondered this…easy, but IS visible in the Source code and this was to be private…) I used the following. I had added a css class in the Geodir->Place Settings->Custom Fields section.

    Say your custom class on the tab’s custom fields is: my-tab-info. The CSS would be:
    .my-tab-info{display:none!important;}
    dd [data-tab=”#gd_tab_1″]{display:none!important;}
    I got the #gd_tab_1 by looking at the page’s css.

    Just in case this helps someone.

    Thanks guys for your help!

    #428354

    Guust
    Moderator
    Post count: 29970

    Gotta say: “Admin Only” sounds like….”Admin Only.”

    These settings are for the Add Listing form, so “Admin Only” means only admins will see and can edit this field in the Add Listing form.
    The option “Show in what locations” is for display on the frontend.

    1. I found my “missing” textarea field that said Admin Only — only showed on front side of Details page — when there was something in the field!

    Yes, that is standard, empty fields do not show.

    Thanks for your tip 🙂

    #428444

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have changed the wording to make this clearer in future.

    Stiofan

    #428546

    jahusdtc
    Expired Member
    Post count: 162

    Thank you. That’s very kind!

Viewing 11 posts - 1 through 11 (of 11 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount