Good Morning,

I am after some help, I am still fairly new to php development so apologies if this one has been answered before,

I have been tasked to build an email migration tracker that automates emails, this part I think I have covered, one part I am not sure with and would love some guidance is the form has checkboxes (check list) which when they are ticked I need the current date to be populated in the textbox next to them, in the correct date format, is there any way in php this can be done, any advice would be much appreciated


Recommended Answers

All 8 Replies

This is done using JavaScript not PHP. It is "client-side" scripting/programming.


Have you got any ideas how this can be done

I use jQuery (a JavaScript library). Can you provide the FORM code ?

I'm afraid not havn't built the code yet I hoping to get this done later on today

To get you started...

<!DOCTYPE html>
<meta charset="utf-8" />
<form id="js-tracker-form" name="tracker" action="/tracker" method="POST">
    <p><input type="checkbox" name="check1" value="1"> <input type="text" name="check1date" value=""></p>
    <p><input type="checkbox" name="check2" value="1"> <input type="text" name="check2date" value=""></p>
    <p><input type="checkbox" name="check3" value="1"> <input type="text" name="check3date" value=""></p>
    <p><input type="submit" name="submit" value="Submit"></p>
<script src="//"></script>
    var today = new Date();
        if($(this).prop("checked")) {
            //the actual checking of the element beats this event handler
        } else {

JavaScript Date

Great thanks very much for this works a dream, I will be able to inplement this into my code, is there anyway of displaying the date in 10/10/2013 formate at all?

That's what the bottom link is for ;-)

Great thanks sorry missed that one, thanks again for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.