Results 1 to 5 of 5

Thread: How to include a date value in a form
      
   

  1. #1
    VFRodriguez's Avatar
    VFRodriguez is offline Staff Sergeant
    Join Date
    Dec 2007
    Posts
    45

    Default How to include a date value in a form

    I want to create a loan calculator online in the page
    http://www.prestamosimple.com/loan-c...tor-online.php

    My problem is that I don't know how to validate the field LOAN START DATE with today's date, so that the user may change it.
    Give me an idea to do this.

  2. #2
    VFRodriguez's Avatar
    VFRodriguez is offline Staff Sergeant
    Join Date
    Dec 2007
    Posts
    45

    Default Re: How to include a date value in a form

    I myself will give the answer:
    You need to create three combox: one for the day, one for the month and one for the year. After submitting the form, you need to create the date combining the elements in a .php file.
    $day = $_POST['Day'];
    $month = $_POST['Month'];
    $year = $_POST['Year'];
    So, the resulting date is:
    $resultingdate = $year."-".$month."-".$day;
    NOTE: When creating the combobox, the value for numbers below 10 must have the 0 before.

  3. #3
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to include a date value in a form

    Why don't you simply add a Jquery Date Picker in your form and set the default date to be the "Current Date"?
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  4. #4
    VFRodriguez's Avatar
    VFRodriguez is offline Staff Sergeant
    Join Date
    Dec 2007
    Posts
    45

    Default Re: How to include a date value in a form

    How do you do that?

  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: How to include a date value in a form

    From the menu, Insert -> jQuery UI - jQuery Datepicker.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Tags for this Thread

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49