Create CMS Item with Date field using Form w/ Logic?

There is no specific “Date” field in Webflow forms, to my knowledge, so I’ve used a text field to substitute for it in one of my forms. I attempted to use Logic to use the form to create a CMS item, but when I went to select the collection to add an item to from the logic builder, all the collections that contained date fields (including the one i needed) were greyed out. Anyone have a solution to this?

Two separate things here.

First, although Webflow does not support a date field, HTML5 does.
You need to set the input field type=date. Unfortunately you cannot do that with custom attributes, so you need to do it using script or else you can use Sygnal Attributes if you do this a lot on your site.

Second, Logic has a “strongly typed” design to manage its data integrity, so the data flowing inside of Logic MUST be rigidly type-defined before it gets to Logic. Since Webflow does not have a date type field, Logic doesn’t support date-type data.

You’d need to use a different automation solution to add/update those fields. Make.com is popular for this.

Welcome @doc :wave:

Unfortunately dates are a bit non-trivial :sweat_smile: but here’s an approach to solve your problem.

Skip Webflow Logic for this, it’s not yet at the point that will meet your needs. Instead, use Make (Integromat).

Here’s how.

You can add some fun stuff to your Webflow form to help users like a Date Picker.

Submit that form to Make (Integromat). Here’s a screencast walking through how to do just that:

To your point, when you submit a date in a form, it’s submitted as text. That’s not a limitation of Webflow, everything is submitted as text when submitting any forms. Regardless of what form “type” you set, thats just how forms work on the web :smile:

The trick is to convert that text into a date format, and this is done with Make (Integromat).

Here’s what that conversion looks like in Make:

  • Choose the “date and time” tab.

  • Select “parseDate”.

  • Replace the hard coded date “2023-07-06” with the text date submitted from your form.

  • Use this formatter: YYYY-MM-DD hh:mm a

The end result looks like this:

parseDate( 2023-07-06 ; YYYY-MM-DD hh:mm a )

Now your text date as been converted into a “date object” in a format that the Webflow CMS understands.

Reviewing the Webflow CMS after this Make scenario runs and you’ll find the correct date stored for your item:

Hope that helps!