Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Blackjaw

    (@blackjaw)

    Well that works great, and with no modifying the plugin code.

    Thank you!

    Thread Starter Blackjaw

    (@blackjaw)

    Hi Mike!

    It almost did the trick. To use CSS to hide the div directly after the check box I need to use a CSS adjacent sibling selector, and it wouldn’t work right because the checkbox was inside a paragraph instead of “adjacent” to the div.

    I was able to get it working by altering the plugin code, which sadly means I’ll need to do this again next time up update plugin.

    Essentially I removed the RSVP_START_PARA. and .RSVP_END_PARA around:

    "<label for=\"rsvpFor".$a->id."\">".
                        sprintf(__("RSVP for %s ?",'rsvp-plugin'), htmlspecialchars($a->firstName." ".$a->lastName))."</label> ".
      									"<input type=\"checkbox\" name=\"rsvpFor".$a->id."\" id=\"rsvpFor".$a->id."\" value=\"Y\" />"

    in “rsvp_frontend.inc.php”, and making sure to leave the semi-colon.

    Then I added the following CSS to my theme:

    div.rsvpAdditionalAttendee > input[type=checkbox] + div {
    	display: none;
    }
    
    div.rsvpAdditionalAttendee > input[type=checkbox]:checked + div {
    	display: block;
    }

    And now it seems to work as I want it to. When the checkbox isn’t checked, the extra questions are hidden. When checked, the questions show up.

Viewing 2 replies - 1 through 2 (of 2 total)