2

I have purchased one extension for Delivery date and comment box. Now I want to set Comment Box Mandatory, I have tried I think it uses Knockout JS so I am unable to set it mandatory. Any Help.

My Code:-

<!-- ko if: bssDeliveryEnable() -->
<li class="bss-delivery">
    <div class="shipping_arrival_date">
        <label for="shipping_arrival_date" data-bind="i18n: 'Delivery Date'"></label>
        <div class="control">
            <input readonly="readonly" id="shipping_arrival_date" class="shipping_arrival_date"
                   type="text" size="17" name="shipping_arrival_date"
                   data-bind="afterRender: initDate()"/>
        </div>
    </div>
    <!-- ko if: bssDeliveryTimeSlot() -->
    <div class="delivery_time_slot">
        <label for="delivery_time_slot" data-bind="i18n: 'Delivery Time Slot'"></label>
        <div class="delivery_time_slot">
            <select id="delivery_time_slot"
                    data-bind="options: listTimeSlot(),
                        optionsText: function(item) {
                            return item
                        },
                        optionsValue: function(item) {
                            return item
                        },
                        optionsCaption: $t('Please select delivery time slot')">
            </select>
        </div>

    </div>
    <!-- /ko -->
    <!-- ko if: bssShippingComment() -->
    <div class="shipping_arrival_comments">
        <label for="shipping_arrival_comments" data-bind="i18n: 'Shipping Arrival Comment'"></label>
        <div class="datetime-delivery">
            <textarea id="shipping_arrival_comments" class="shipping_arrival_comments"
                   type="text" size="17" name="shipping_arrival_comments"></textarea>
        </div>
    </div>
    <!-- /ko -->
</li>
<!-- /ko -->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.