Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Get Checkboxes Value #8214
    chrisfrick
    Participant

    Here you go…

    array(1) { [0]=> string(1) “2” }

    Greets
    Chris

    in reply to: Get Checkboxes Value #8165
    chrisfrick
    Participant


    <?php if (in_array('1', (array) $form->getValue('iphorm_5_1')) : ?>
    Option 1 is ticked
    <?php endif; ?>

    But doesn't work :/

    in reply to: Get Checkboxes Value #8163
    chrisfrick
    Participant

    I tried this…

    <?php
    if (in_array(‘1’, (array) $form->getElement(‘iphorm_5_1’)){
    echo “Option 1!”;
    }
    ?>

    But dind’t work and it’s the right ID, the Value of Option 1 is ‘1’ as well.

    Other idea?

    in reply to: Get Checkboxes Value #8157
    chrisfrick
    Participant

    Hmm.. But I got 2 Checkboxes…

    Option 1
    Option 2

    With this solution I only know… if 1 Checkbox is checked or not, but I need to know if Option 1 or Option 2 is checked.

    Thanks
    Chris

    in reply to: Get Checkboxes Value #8125
    chrisfrick
    Participant

    okay no other problem 🙂

    • This reply was modified 11 years, 5 months ago by chrisfrick.
Viewing 5 posts - 1 through 5 (of 5 total)
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy