Disable and remove general terms and conditions during submission process

Hi,

I followed your advice on a ticket earlier: Disable and remove general terms and conditions during submission process

It worked, users that registrer dont have to accept the terms anymore. But later in the company submission process the terms are still visble.

How can i remove the terms here as well?

I use a template on this page /submit-listing/details. Could this be the problem? Should i refresh it?

As i see it there are two aspects:

  • I want to hide this element: <input type=“checkbox” name=“_terms” id=“_terms_67bf5c09525eb” value=“1” required=“required”
  • And i want it to be non-required

Is there a php snippit for this?

Hello @Ranan,
I would not bother too much here and call jQuery to the rescue :

jQuery(document).ready(function($) {
 $("#_terms_67bf5c09525eb").prop("checked",true); //let's check it to enable submission
 $("#_terms_67bf5c09525eb").parent().hide(); //hide it. 
});

Cheers,

1 Like

Thank you Cotasson, i uploaded it as a snippet with snippets pro. As a JSscripts snippet (attachment)

But the terms and conditions box is still there. Am i doing something wrong here? I don’t see any errors? It seems as if nothing is executing…

Can’t you see the javascript being injected in your code source of your page (ctrl+u)?

Maybe some caching plugins or device (CDN) that you need to refresh.

You may try to add this code snippet to an existing *.js file, knowing that if it comes from a plugin or theme it will be overidden at the next update.

If you do so, try hitting ctrl+f5 to clear cache (to recreate the *.js file)

I cant see the source code being injected. But i think wp-optimze might be the problem… I ruled out it being a caching problem

Could it be that could flare is the problem?

Yes, cloudflare is part (somewhat) of the CDNs I mentioned earlier.

Also, I checked out twice the code I provided.

It is no longer working as the css ID has changed.

It now needs to be :

First snippet (original ID) is not working, second does.

Updated

jQuery(document).ready(function($) {
 $("#_terms_67c5e0bc4d646").prop("checked",true); //let's check it to enable submission
 $("#_terms_67c5e0bc4d646").parent().hide(); //hide it. 
});

You may have to address (target) this checkbox differently, should the checkbox change again.

Cheers !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.