How to Make the Terms & Conditions Button on an Odoo 15 Website Active or Inactive

Many websites include forms that may only be submitted after you agree to their terms and conditions. This article will show you how to build a basic form with a terms and conditions field. The submit button shouldn’t be active until the user accepts the terms and conditions. The submit button should remain unclickable in all other circumstances.

The field for terms and conditions is visible here, along with the form’s submit button.

screenshot of form with terms and conditions field and disabled submit button

The submit button is disabled in the screenshot above because the terms and conditions are not accepted. Let’s examine the process.

Register

To fulfill our purpose, we may now add the JavaScript function.


On the basis of the terms and conditions of a form view, we may then decide whether to disable or enable the submit button. When a user clicks the submit button, the page will appear as seen below.

screenshot of form with terms and conditions field and enabled submit button

In accordance with the terms and regulations on the Odoo Website, you can then enable or disable the submit button.

Odoo Community day

Wan buffer services thrilled to be part of Odoo Community Days India 2024! Mark your calendars for August 23-24 to engage with industry leaders and discover the latest in Odoo technology and solutions. See you there!

Hire Dedicated Developers

Reach new heights with WanBuffer’s offshore engineering team. Our team of over 50 highly skilled and dedicated full-stack software engineers have the expertise and experience to tackle your key technology challenges, improve efficiency and reduce expenses. Let us help you drive your business forward today.

Schedule Meeting