Typeahead formtool
August 28 2012, 9:49 PM
This is a new formtool in 6.2 that can be used with uuid and array properties (that means that type="uuid" or type="array", and ftType="typeahead"), turning the field into a type-ahead or autocomplete input.
Unlike the normal uuid and array formtools, typeahead expects a single content type in the ftJoin attribute. We may add support for multiple content types in the future, but one is enough for almost all the use cases of an autocomplete field. It DOES support ftAllowCreate - notice that there is a "Create New Image" option in the above snap.
Examples
UUID Field
<cfproperty name="someImage" type="uuid" hint="Related content items." required="no" default=""
ftseq="43" ftfieldset="Related Content" ftwizardStep="News Body" ftlabel="One image"
fttype="typeahead" ftJoin="dmImage" />
<cfproperty
name="multipleImages" type="array" hint="Related content items." required="no" default=""
ftseq="44" ftfieldset="Related Content" ftwizardStep="News Body" ftlabel="Many images"
fttype="typeahead" ftJoin="dmImage" />
<cfproperty
name="anotherImage" type="uuid" hint="Related content items." required="no" default=""
ftseq="45" ftfieldset="Related Content" ftwizardStep="News Body" ftlabel="Another image"
fttype="typeahead" ftJoin="dmImage" ftInlineData="true" />
267 views and 1 response
-
Aug 29 2012, 5:07 PMSean Coyne responded:Sweet!