0

I've built a CloudPage subscribe form that has an option to enter up to three birthdays.

Only "birthday 1" is required for the form to be submitted. "birthday 2" and "birthday 3" are optional. However, when someone submits the form with just "birthday 1" filled in, "birthday 2" and "birthday 3" are automatically populated with today's date in the target Data Extension.

We did not select a default in the Data Extension. We're using the bootstrap-datepicker.js to select dates.

One suggestion was to try "setDate","" "setYear",""

but that doesn't work either.

Any thoughts?

1 Answer 1

0

If you are sure that you haven't assigned the Current Date as the default date in the DE field, then the only thing I can think of is that your datepicker JavaScript is submitting the current date when you post the form. You can verify this from your web browser inspector. Here are the steps (for Chrome, other browsers would be similar):

  1. Select Developer > Developer Tools from the View menu
  2. Click on Network tab
  3. Load URL of CloudPage
  4. Select the Clear icon (next to the red dot in the Network pane)
  5. Submit form
  6. Click on name of page in the Network pane that made form post request
  7. Look at the Form Data section in the Headers tab

This will show you the actual form values that were submitted by the page and enable you to validate whether the JavaScript is inserting the current date, or something else is.

2
  • Was this the issue? Is your JavaScript date picker inserting the current date? If so, please feel free to accept my answer for the benefit of others. Commented Apr 10, 2017 at 3:16
  • Indeed, the boostrap-datepicker was sending the default data... now, to investigate that... attributes:{"first_name":"George","last_name":"XXX","email":XXX","address":"XXX","province":"ON","city":"Toronto","postal_code":"XXX","child1_first_name":"George","child1_last_name":"XXX","child1_birthday":"07%2F22%2F2010","child2_first_name":"","child2_last_name":"","child2_birthday":"04%2F09%2F2017","child3_first_name":"","child3_last_name":"","child3_birthday":"04%2F09%2F2017","parental_consent":"1","language":"EN"} Commented Apr 10, 2017 at 3:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .