• Hi

    I use the forms for a booking form on my accommodation website. I need to automatically calculate a date from the inputted date. Is there an y way the plugin could do this?

    Basically I need to automatically calculate 42 days prior to the arrival date entered and display this to the form recipient.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    You could add another field and inside that one you could use this formula

    $$field_rnField4$$.AddDays(42)

    replace rnfield4 for the date of your date picker. This formula would add 42 days to the date submitted in the other field.

    Hope this helps but if it doesn’t please let me know!

    Thread Starter tomematthews88

    (@tomematthews88)

    Thank you so much for your reply!

    I have added a new date field and entered the formula into the Formula Builder, replacing rnfield4 with the correct ID of the date picker so the formula is:

    $$field_arrivaldate$$.AddDays(42)

    I get the error “An error ocurred
    SyntaxError: No identifiers allowed directly after numeric literal”

    What am I doing wrong please?!

    Thread Starter tomematthews88

    (@tomematthews88)

    Hi Edgar –

    Please could you talk me through exactly how to enter this code? I think I have done something wrong as I get the error code above and the field does not display a date

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto-calculate date’ is closed to new replies.