0

I've already managed to modify checkbox markup for a bit but there's still something that I can't access. Current markup is as follows and here you can see the duplicate text of which last one should be removed:

<div class="form-item form-item-submitted-payment-methods-1 form-type-checkbox checkbox">
<!-- This LABEL seems to be unreachable; cannot remove/modify it -->
<label class="control-label" for="edit-submitted-payment-methods-1">
    <!-- This DIV can be modified via [hook_theme]_checkbox(&$variables) -->
    <div class="checkbox">
        <label>
            <input type="checkbox" id="edit-submitted-payment-methods-1" name="submitted[payment_methods][1]" value="1" class="form-checkbox checkbox require-one-edit-submitted-payment-methods">
            <span class="checkbox-material"><span class="check"></span></span>
            In cash (to a member or representative)
        </label>
    </div>
    In cash (to a member or representative) <!-- Duplicate and should be removed: how to? -->
</label>

0

Well, solution was to remove "fake" label and wrapper div which was moved upper to wrap "control-label". All done in THEME_NAME_checkbox(&$variables){}.

    <div class="form-item form-item-submitted-payment-methods-1 form-type-checkbox checkbox">
<label class="control-label" for="edit-submitted-payment-methods-1">
    <div class="checkbox"> <!-- Remove this and add it as suffix/prefix for the element -->
        <label> <!-- Remove this also -->
            <input type="checkbox" id="edit-submitted-payment-methods-1" name="submitted[payment_methods][1]" value="1" class="form-checkbox checkbox require-one-edit-submitted-payment-methods">
            <span class="checkbox-material"><span class="check"></span></span>
            In cash (to a member or representative)
        </label>
    </div>
    In cash (to a member or representative) <!-- Duplicate and should be removed: how to? -->
</label>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.