Support

Account

Home Forums General Issues Current date as checkbox option

Helping

Current date as checkbox option

  • Hi,
    I would like to create a single checkbox which records the date when it is checked.
    Is there a way to add this into the choices field?
    I’ve tried <?php echo date("Y/m/d");?> with no luck.

  • To do this in real time you need js…

    
    <input id="remember" name="remember" type="checkbox" onclick="validate()" />
    
    <script type="text/javascript">
        function validate() {
            if (document.getElementById('remember').checked) {
                alert("Checked"); //Here you can print your date
            } else {
                alert("Unchecked");
            }
        }
    </script>
    
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Current date as checkbox option’ is closed to new replies.