Is there a way to turn off contact form per listing?

This topic contains 16 replies, has 2 voices, and was last updated by  tinamama 4 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #501671

    tinamama
    Full Member
    Post count: 317

    I haven’t had this yet, but in anticipation of it happening…

    I imagine I will eventually have a business that is not going to want to have the contact form for people to be able to contact their business via email. Is there a way to turn it off for just a specific business, not all of them?

    Still have the email in the backend, to enable verification of the business, but turn the contact form off in the frontend so no one can contact that specific business via that form?

    #501683

    Alex Rollin
    Moderator
    Post count: 27815

    You can do it with custom CSS, with an entry for each page ID. But no, not with GD features, but as you surmised you can simply leave the email field blank. You can add another email field with a different key, and then add a label for the special field like “Contact Form Email – Leave Blank to Turn off contact form”

    #501690

    tinamama
    Full Member
    Post count: 317

    I can’t leave it blank because I have emails required. I don’t want to change that because it’s how listings are verified, isn’t it?

    I like the idea of having a separate email field for the form…but how do I set that up in the backend to be for the form?

    What do you mean “with a different key”?

    #501693

    Alex Rollin
    Moderator
    Post count: 27815

    Then you would need to use custom CSS to hide it, or use a 3rd party plugin like widget logic to show/hide a widget based on a custom field value.

    https://wpgeodirectory.com/docs-v2/faq/common-examples/#logic

    #501694

    tinamama
    Full Member
    Post count: 317

    …And, as I suspected, I just got my first one that says they do not have any email address for the company. A national corporation, so I’m not surprised. They want everything going through their website. They do not have local email addresses. So no email address even for verification purposes. So how do you handle something like this?

    #501695

    Alex Rollin
    Moderator
    Post count: 27815

    Then you would need to use custom CSS to hide it, or use a 3rd party plugin like widget logic to show/hide a widget based on a custom field value.

    https://wpgeodirectory.com/docs-v2/faq/common-examples/#logic

    CSS would be something like this:

    
    
    
    .post-33 #gd_ninja_forms-2 {
        display: none;
    }
    

    When your business case requires more complex logic you might consider getting a builder, but, these workarounds will work, too.

    For the field, they would need to enter some form of placeholder email in the listing, if the field is marked as required.

    #501702

    tinamama
    Full Member
    Post count: 317

    I’m not sure that what you are explaining is what I want. I don’t want to hide either of these field ideas for all listings. I want them both for most listings. I want the contact form field optional.

    If I am understanding you correctly, you first suggested having a separate, optional, email field for the contact form…and I like that.

    So what I am envisioning is 2 email fields: the REQUIRED email field for the backend for verification/claim listing purposes. And a second email field solely for the contact form. Both could be the same email, or they could be different, and the contact form email field could be left blank so they don’t actually use it. But the first one is mandatory and is not shown on the front end ever…is only shown in the back end to me and used for verification purposes.

    So, with all that in mind…how do I do that? Because what you are describing doesn’t sound like what I am thinking of…although I may just be misunderstanding?

    #501703

    tinamama
    Full Member
    Post count: 317

    If this is super complicated, I guess I’ll just resort to keeping the dummy email that I currently have in the listings that I don’t have emails for (although this will mean they cannot claim their listings, right?), and use your CSS code (thank you!) to turn off their contact forms. That will work too. I just really like your idea of having a second, optional, contact form field. 🙂

    #501761

    Alex Rollin
    Moderator
    Post count: 27815

    As of now the integration only works with the ’email’ field, but I will note your idea for the developers to consider for future versions.

    #502120

    tinamama
    Full Member
    Post count: 317

    Ok so if you’re using the default form, how do you turn that off per listing? That’s not a ninja form, right? I’m having a hard time figuring out the default.

    #502176

    Alex Rollin
    Moderator
    Post count: 27815

    To turn it off per post using you would use custom css like:

    
    
    
    .post-33 #gd_ninja_forms-2 {
        display: none;
    }
    

    The form is edited from within Ninja Forms in the WP backend.

    #502179

    tinamama
    Full Member
    Post count: 317

    Ok, sorry for the confusion…I just figured out why I got confused. I was thinking of the claims form. THAT one has a default that is not a ninja form, right?

    That’s the one that I think I’ve had issues with…I got it mixed up with the contact form. So much info to sort through…my brain is having a hard time storing it all! Plus there’s been some big breaks in between working lately, as I had surgery recently and couldn’t get back to this for awhile and forgot some stuff. Having to relearn.

    Ok, got it now, thanks! I’ll go see if this works! THANK YOU!

    #502183

    tinamama
    Full Member
    Post count: 317

    Ok that didn’t do anything. Do I need to talk to the theme’s tech support for this?

    Here’s the listing that I am trying to turn the contact form off for:
    https://homeschoolrealm.com/wordpress/businesses/fresno/play-places/johns-incredible-pizza

    The button is still there…am I supposed to do something to turn off the actual button?

    #502195

    Alex Rollin
    Moderator
    Post count: 27815

    Try this CSS:

    
    
    
    body.postid-414 a.btn.btn-success {
        display: none;
    }
    
    #502207

    tinamama
    Full Member
    Post count: 317

    That worked! Thank you!!

Viewing 15 posts - 1 through 15 (of 17 total)

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

Open Support Ticket