Gift wrapping + checkbox option card with message or blank

Gift wrapping + checkbox option card with message or blank

5 0 1

Hello everyone,

I added two optional checkboxes in my cart drawer for a blank gift card or with a message.


When the blank card option is checked, i want the cart.note to be = "Blank card" and when the message option is checked, that the cart.note is = "the message".
no problem to capture the message with cart.note but I don't succeed to assign a value like "blank cark only" to cart.note when the first option is checked.


              <label class="gift_wrapping_label" for="toggle">offrir un cadeau ?</label>
              <input type="checkbox" id="gift_card_checkbox">
              <div class="container_giftcard" id="text">
                <div class="blank_card_checkbox">
                  <input type="checkbox" id="card_only">
                  <label for="card_only">Carte vierge</label>
                <div class="message_checkbox">
                  <input type="checkbox" id="card_message">
                  <label for="card_message">Message personnel</label>
                <textarea class="gift_message" name="note" cols="50" rows="3">{{cart.note}}</textarea>

I want to have access to the customer's choices between blank card or message with cart.note because it's easier to process for me.

Capture d’écran 2021-10-14 à 15.39.54.png

Replies 0 (0)