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

    Calendar dependent on radio button

    I am working a form with radio button and calendar. What I would like to do is when the user selects Done - be able to display the calendar and if Not Done is selected, disable the calendar.

    Here is my code:

    <td class="tajuk_kecil"><div align="right">Status </div></td>
    <td class="tajuk_kecil"><div align="center">:</div></td>
    <label><input name="status" type="radio" value="Done" checked>Done </label>
    <label><input name="status" type="radio" value="Not Done">Not Done</label>
    </tr >

    <td class="tajuk_kecil"><div align="right">Date</div></td>
    <td class="tajuk_kecil"><div align="center">:</div></td>

    $myCalendar = new tc_calendar("date5", true, false);
    $myCalendar->setDate(date('d'), date('m'), date('Y'));
    $myCalendar->setYearInterval(2000, 2015);
    $myCalendar->dateAllow('2008-05-13', '2015-03-01');
    $myCalendar->setDateFormat('j F Y');
    ?> </td>


    Any suggestions would be greatly appreciated. Thanx

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Behind the Wall
    Thanked 372 Times in 368 Posts
    this would imply the user submitting the form as PHP (on the server) cannot react to user interaction (on the client).
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


    Posting Permissions

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