Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Current Date in Form

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33514
    allampatu
    Participant

    hi there
    i have this form code in a page called widget.php and included in a WP template.

    i would like to have a current date in the form when user visit the page!
    how can i do that? i suppose javascript but i have no idea how to figure out this

    thanks for help guys

    ...



    ...
    #83527
    djpic
    Participant

    Not too familiar with Word Press, but could be done in both javascript and php; shouldn’t be too hard either way.

    #83533
    allampatu
    Participant

    i thought about javascript but i’m not good in it. unfortunately the widget is provided by a booking service and i can’t change the html code

    #83534
    jamygolden
    Member

    Check out strtotime().

    #83587
    djpic
    Participant

    If you can’t change the HTML code, then the only way I would think is javascript as PHP would require you to output the HTML code with one of the options set to:

    Unless of course there is another way I am unaware of.

    #85237
    allampatu
    Participant

    i’m almost done!

    i’m using this javascript to create the options with the current date

        

    connected with this html



    but i’ve added the ceck out field too but it doesn’t display nothing.

    could you help me? thanks for reading

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.