Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2013
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Smile Radio button group disable and enable

    I have two radio groups. Say one for food option and the other one for toppings.
    I want to enable toppings radio group to appear only after food option is selected.

    <legend>Choose the pizza wrap type ?</legend>
    <div class="control-group"> /*radio group for food option*/
    <label class="radio">
    <input type="radio" name="pi" id="pi3"value="3" {% if pi.rel == 3%}
    checked {% endif %}>
    Vegan
    </label><br>
    <label class="radio">
    <input type="radio" name="pi" id="pi2" value="2" {% if pi.rel == 2 %}
    checked {% endif %}>
    Vegetarian
    </label><br>
    <label class="radio">
    <input type="radio" name="relevance" id="relevance1" value="1" {% if
    pi.rel == 1 %} checked {% endif %}>
    Non vegetarian
    </label><br>
    <label class="radio">
    <input type="radio" name="relevance" id="relevance0" value="0" {% if
    pi.rel == 0 %} checked {% endif %}>
    Halal meat
    </label>
    </div>

    <h5>Toppings?</h5>
    <div class="control-group"> /*radio group for topping option*/
    <label class="radio">
    <input type="radio" name="top" id="top3" value="3" {% if top.rel == 3
    %} checked {% endif %}>
    Vegan
    </label><br>
    <label class="radio">
    <input type="radio" name="top" id="top2" value="2" {% if top.rel == 2
    %} checked {% endif %}>
    Veggie
    </label><br>
    <label class="radio">
    <input type="radio" name="top" id="top1" value="1" {% if top.rel == 1
    %} checked {% endif %}>
    Meat
    </label><br>
    <label class="radio">
    <input type="radio" name="top" id="top" value="0" {% if top.rel == 0
    %} checked {% endif %}>
    Halal meat
    </label>
    </div>

  • #2
    Senior Coder
    Join Date
    Dec 2010
    Posts
    2,398
    Thanks
    12
    Thanked 570 Times in 563 Posts
    Wow ... this is a déjà vu ... I am pretty sure we had the same question a few days ago

  • #3
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    is that jsp or something??


  •  

    Tags for this Thread

    Posting Permissions

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