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 5 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
August 6, 2019 at 9:02 pm #501671
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?
August 6, 2019 at 9:33 pm #501683You 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”
August 6, 2019 at 10:08 pm #501690I 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”?
August 6, 2019 at 10:15 pm #501693Then 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
August 6, 2019 at 10:16 pm #501694…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?
August 6, 2019 at 10:21 pm #501695Then 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.
August 6, 2019 at 11:38 pm #501702I’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?
August 6, 2019 at 11:45 pm #501703If 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. 🙂
August 7, 2019 at 10:29 am #501761As of now the integration only works with the ’email’ field, but I will note your idea for the developers to consider for future versions.
August 8, 2019 at 7:39 pm #502120Ok 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.
August 8, 2019 at 11:28 pm #502176To 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.
August 8, 2019 at 11:32 pm #502179Ok, 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!
August 8, 2019 at 11:40 pm #502183Ok 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-pizzaThe button is still there…am I supposed to do something to turn off the actual button?
August 9, 2019 at 12:05 am #502195Try this CSS:
body.postid-414 a.btn.btn-success { display: none; }
August 9, 2019 at 5:09 am #502207That worked! Thank you!!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket