# Order as guest checkbox

**URL:** https://forum.shopware.com/t/order-as-guest-checkbox/51667
**Category:** International (English Only)
**Tags:** programming
**Created:** [10. März 2018 um 10:45 UTC](https://forum.shopware.com/t/order-as-guest-checkbox/51667 "2018-03-10T10:45:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zwerg69](https://avatars.discourse-cdn.com/v4/letter/z/eada6e/32.png) [@Zwerg69](https://forum.shopware.com/u/Zwerg69)
#### Post date: [10. März 2018 um 10:45 UTC](https://forum.shopware.com/t/order-as-guest-checkbox/51667/1 "2018-03-10T10:45:09Z")

</div>

Hi,  
I´m having difficulties understanding how the Checkbox that handles the “order as guest” or “create a account to order” works in shopware 5.&nbsp;

It removes/adds two attributes of the two HTML inputs for the password and adds/removes a class to the div that both inputs are in.&nbsp;

It removes/adds required=“required” and aria-required=“true” depending on the checkbox and is–hidden is added to the div to hide or show the inputs.

When I do the same in the browser it doesn’t work. The fields are marked as required.

Can someone explain me how that works ?&nbsp;  
I´m trying to reproduce the same function with a button click.

Regards
