Skip navigation
Currently Being Moderated

Auto Populate Date Fields by One Day

Dec 15, 2011 4:40 PM

I have a form with 7 Date Fields.

 

Is it possible if a user select a date in the first one then

auto populate the rest of the date fields by one Day.

 

For example if the first Date Field is December 15, 2011 then

second Date Field will be: December 16, 2011

Third Date Field: December 17, 2011

and so on....

 

THANK YOU

 
Replies
  • Currently Being Moderated
    Dec 15, 2011 10:42 PM   in reply to mmgiath

    Hi,

     

    Yes, this is possible by writing the following script in the "exit" event of the "Date1" field in "FormCalc" as below

     

     

    Date2.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM DD, YYYY") +1, "MMM DD, YYYY")

    Date3.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM DD, YYYY") +2, "MMM DD, YYYY")

    Date4.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM DD, YYYY") +3, "MMM DD, YYYY")

    Date5.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM DD, YYYY") +4, "MMM DD, YYYY")

    Date6.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM DD, YYYY") +5, "MMM DD, YYYY")

    Date7.rawValue = Num2date(Date2Num(Date1.formattedValue, "MMM DD, YYYY") +6, "MMM DD, YYYY")


     

    Thanks,

    Dev.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points