Skip to Content
avatar image
Former Member

Interactive form -Dynamic input fields

Hi,

I am working with an interactive form.

After Userinputs a InputField1 it should populate Inputfield2 dynamically.

Lets Say if I enter a 01/01/2009 in input field1, second input field should be a week after date 01/07/2009.

How do we handle this ?

rgds

Vara

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jun 02, 2009 at 08:19 AM

    Hi,

    Select the InputField1 and goto Script Editor and select the Event type: "Change" and Language as "FormCalc" and in editor write the below code:

    InputField2.rawValue = Num2Date(IsoDate2Num($.rawValue)+7,"DD/MM/YYYY")
    

    Based on your requirement change the display pattern of both the date fields in the object pallette.

    Note: Make both the fields as Date/Time Fields and not TextFields.

    Regards

    Pradeep Goli

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vasa,

      first Can you please tell me what is date format it is displaying for you once form loaded and what is the format is displaying after the date change...

      Thanks

      Ali