Skip to content
Devix Open Source

WooCommerce checkout

The country button sits inside the store's own phone field, and the number is rejected or saved the way the plugin does it on the server.

Live preview
<form id="checkout" class="demo demo--wide" novalidate>
  <p class="demo-chip">Checkout · billing details</p>
  <div class="demo-grid-2">
    <div class="demo-field">
      <label class="demo-label" for="first">First name</label>
      <input id="first" class="demo-input" value="Lab" autocomplete="off">
    </div>
    <div class="demo-field">
      <label class="demo-label" for="last">Last name</label>
      <input id="last" class="demo-input" value="Buyer" autocomplete="off">
    </div>
  </div>
  <div class="demo-field">
    <label class="demo-label" for="email">Email</label>
    <input id="email" class="demo-input" value="buyer@example.com" autocomplete="off">
  </div>
  <div class="demo-field" id="phone-field">
    <label class="demo-label" for="billing_phone">Phone <span class="demo-hint">· the store's own field, untouched</span></label>
    <input id="billing_phone" class="demo-input" autocomplete="off">
    <p id="error" class="demo-error" role="alert"></p>
  </div>
  <div class="demo-row">
    <button class="demo-btn" type="submit">Place order</button>
    <span id="saved" class="demo-kv" hidden></span>
  </div>
</form>