Hidden Fields For Admin Use Only?

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

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

Open Support Ticket
  • Author
    Posts
  • #13060

    dnosker
    Buyer
    Post count: 68

    I am wanting to add a couple fields to listings that are not seen on the front end and only seen in the backend for admin use only. I need to have a notes section and a customer number field that are only seen by admin.

    I have tried adding a field that is not active but then that is not seen in the backend either. I do not want these fields to be displayed to the end users or listing owners.

    Is there a way to have hidden fields for admin use only?

    Thanks,

    Dave

    #13061

    Simone
    Expired Member
    Post count: 3515

    Hello, you can hide the fields with css, using display:none; in the id of the row (e.g. geodir_NAMEOFYOURROW_row)

    #13063

    dnosker
    Buyer
    Post count: 68

    A little confused… Not sure how to add custom CSS for just ID of the row versus overriding a class.

    Can you give an example of how to do this?

    #13064

    Simone
    Expired Member
    Post count: 3515

    when you add a field, a new id is assigned to that field. You can add on your style.css the display:none; attribute and it will be hidden on frontend.
    For example if I’m going to add a checkbox named “test” (html variable name set in the Custom Field section) the id for that div will be geodir_test_row. Then open the style.css (in your child theme) and add

    
    
    div#geodir_test_row.geodir_form_row.clearfix {
    display:none; }
    #13065

    dnosker
    Buyer
    Post count: 68

    Worked like a charm, thanks much! 🙂

    #13066

    Simone
    Expired Member
    Post count: 3515

    you’re welcome 🙂

    #13112

    Guust
    Moderator
    Post count: 29970

    Another solution is to add the field, and set it as active, but set “sidebar”, “listings” and “detail” display to NO.
    That way the content will not be printed on the source of the frontent; CSS only hides it from view; search engines will still find it!

    You will still need to hide it from view in the Add Listing form.
    The only problem with that is that it still will be printed to the source of the Edit Post form, although not viewable to the user.

    If you want to use it for sensitive data, you will need some coding changes I think.

    #13123

    dnosker
    Buyer
    Post count: 68

    Really need to have setting added to all fields for hidden (admin view only). IMHO any plugins with a forms builder should have this for any fields. Just my 1 cent worth.

    Dave

Viewing 8 posts - 1 through 8 (of 8 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