Results 1 to 3 of 3

Thread: How to output checkbox-groups as CLASS

  1. #1
    New user
    Join Date
    09-10-16.
    Posts
    2

    Frage How to output checkbox-groups as CLASS

    Hi,

    Does anyone have experience how to print radio/checkbox groups in the form templates. Specific im trying to give the checkboxes the CLASS of the GROUP that they belong to as set in the form generator.

    Just a snipped out of the "form_checkbox.html5" template we made.
    HTML Code:
    <ul>
        <?php foreach ($this->getOptions() as $option): ?>
            <li CLASS="<<GROUP NAME HERE>>">
                <span><input type="checkbox" name="<?= $option['name'] ?>" id="opt_<?= $option['id'] ?>" class="checkbox" value="<?= $option['value'] ?>"<?= $option['checked'] ?><?= $option['attributes'] ?>> <label id="lbl_<?= $option['id'] ?>" for="opt_<?= $option['id'] ?>"><?= $option['label'] ?></label></span>
            </li>
        <?php endforeach; ?>
    </ul>
    Last edited by seventh; 11/02/2016 at 16:58.

  2. #2
    New user
    Join Date
    09-10-16.
    Posts
    2

    Default

    Not anyone?

  3. #3
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    484

    Default

    I do not recommend to do this. But you can make a dump in your form_checkbox.html5.
    PHP Code:
    <?php

    log_message
    (print_r($thistrue), 'my-debug.log');

    ?>
    You will find your file in system/logs/.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •