App Connect Data Formatter Support Product Page
Doesn't need answer
calculating a date on a form based on dropdown
Asked 23 Mar 2018 14:42:45
1
has this question
23 Mar 2018 14:42:45 aaron clark posted:
I have a form, on the form is a dropdown populated from a table.Is it possible to add a date into another field on the form that is based on the selection of the dropdown at the top of the form.
Eg. if the first option is selected the date in the field would be today's date+30days.
Please help me I am really stuck
Replies
Replied 23 Mar 2018 15:29:05
23 Mar 2018 15:29:05 aaron clark replied:
<input name="ExpiryDate" type="hidden" class="form-control" id="inp_ExpiryDate" dmx-bind:value="var1.datetime.toDate().addDays(inp_Severity.value)">
this is what I have so far the Severity.value is set to an integer (30) however it is adding on 6 years rather than 30 days
this is what I have so far the Severity.value is set to an integer (30) however it is adding on 6 years rather than 30 days
Replied 23 Mar 2018 17:02:34
23 Mar 2018 17:02:34 aaron clark replied:
its ok I figured it out. You have to format the input as a number as it pulls the info as a text field by default