Hi all, thank you for reading & trying to help!
I am trying to add (already done) a checkbox for customers to click on the checkbox on the checkout page, but it doesn’t show up in the backend for some reason.
I have tried a few ways, from going to the main code of the website and couldn’t find the file/code where to put it, so I made a Custom Liquid field and put it in there, it does show up on the main website but again not in the backend.
If you can help me with what to do that would be amazing!
Here are some images to back up what I am saying
Thank you, People! ![]()
Here is the code(s) I have been trying to use.
<p class="cart-attribute__field">
<input type="hidden" name="attributes[Would You Like to Ship with Recycled Packaging'?]" value="No">
<input type="checkbox" name="attributes[Would You Like to Ship with Recycled Packaging'?]" value="Yes"{% if cart.attributes["Would You Like to Ship with Recycled Packaging'?"] == "Yes" %} checked{% endif %}>
<label>Would You Like to Ship with Recycled Packaging'?</label>
</p>
{% assign field_label = "Use Recycled Packaging?" %}
{% assign required_field = false %}
{% assign position = "middle" %}
{% assign checked_value = "Yes" %}
{% assign hide_checkout = false %}
{% comment %}
Use the code below to add a link in the checkbox text
<a href='' target='_blank'>
</a>
{% endcomment %}
{% comment %}
Do not edit the code below
{% endcomment %}
{% assign gen_id = field_label | remove: " " | strip | downcase %}
<div class="checkbox-container">
<fieldset class="product-form__input line-item-property__field"
data-input-type="checkbox">
<input id="{{ gen_id }}"
class="input-checkbox required__check {% if required_field %}required__field{% endif %}"
form="product-form-{{ section.id }}"
type="checkbox"
name="properties[{% if hide_checkout %}_{% endif %}{{ field_label | strip_html }}]"
value="{{ checked_value }}"
data-controller-form-label="{{ field_label }}"
{% if required_field %}required{% endif %}>
<label for="{{ gen_id }}" class="form__label checkbox__label checkbox__align_{{ position }}">
{{ field_label }}
</label>
</fieldset>
</div>
<style>
.form__label {
max-width: 37rem;
margin-bottom: 0.6rem !important;
}
input[type="checkbox"] {
cursor: pointer;
}
.checkbox__label {
display: inline-block;
max-width: 85%;
}
.checkbox__align_top {
vertical-align: top;
}
.checkbox__align_middle {
vertical-align: middle;
}
.checkbox__align_bottom {
vertical-align: bottom;
}
.checkbox__label > p {
margin: 2px 0px;
}
.checkbox-container, .checkbox-container > fieldset {
margin: 5px 0px;
}
</style>



