lundi 23 novembre 2015

Checkbox submission to display text?

Thank you for your help ahead of time.

I created an office hours block in Concrete5. Some departments aren't open on certain days, so I'm trying to make a checkbox that if checked displays "Closed" rather than the office hours. Here is an example for Sunday:

    <div class="form-group">
    <?php  echo $form->label("Sundayclosed", t("Sunday (close)")); ?>
        <?php  echo (isset($btFieldsRequired) && in_array('Sundayclosed', $btFieldsRequired) ? '<small class="required">' . t('Required') . '</small>' : null); ?>
            <?php  echo $form->text("Sundayclosed", $Sundayclosed > 0 ? date("g:i A", $Sundayclosed) : null, array ('autocomplete' => 'off', )); ?>
</div>

My code works and displays the open and closing time set in the block. However, I'm not sure how to go about adding a checkbox to display "Closed" rather than the time set in the block.

Would anyone mind helping me out? Thank you very much!




Aucun commentaire:

Enregistrer un commentaire