Dawn Theme Customer Registry Privacy Policy Checkbox

I am trying to add a mandatory checkbox to my customer registration page. I have managed to create a checkbox linking to the privacy policies, but I can create a new account also without ticking the box. Anybody know how to fix this and also give the user notice that the box needs to ticked?

I have inserted the code for the box below the code for the field for the password.

{{ 'customer.register.password' | t }}
{%- if form.errors contains 'password' -%} {{ form.errors.translated_fields['password'] | capitalize }} {{ form.errors.messages['password'] }}. {%- endif -%}
Ich habe die Datenschutzbestimmungen gelesen und stimme ihnen hiermit zu.

{{ 'customer.register.submit' | t }}
{%- endform -%}

Hi @VieCape ,

Please change all code:


  
  

{%- if form.errors contains 'password' -%}

  
  {{ form.errors.translated_fields['password'] | capitalize }} {{ form.errors.messages['password'] }}.

{%- endif -%}

  
  

  

{%- endform -%}

I helped you to add disabled to the button, so if the client doesn’t check the checkbox, the button won’t disable disabled.

Hope it helps!

1 Like

You my friend are a hero, thank you so much!

1 Like

It’s great! Thank you for your help. I want to ask an other question: How can I change the shape and color of the check box?

Hi @serhatsalih ,

You can create a question on the community and send me the link. I will check it.
Because this will help build a better community.
Thank you.

Hello,

I also need to add such checkbox, which file should contain this code?

Thank you very much,

Mike