Formless

The Formless feature allow you to setup a Conversational Fore without a form tag.

JSON follows the rules of previous documentation, so you have

options this is the initialise parameters

tags these are your form tags, simplest example:

{
	"tag": "input",
	"type": "text"
}

A tag in JSON follows the supported native HTML tag standards, like min, max, pattern, value, type, so if you want to add min or max you just write it:

{
	"tag": "input",
	"type": "text",
	"min": 3,
	"max": 10
}

Same goes for Conversational Attributes, here we set the label:

{
	"tag": "input",
	"type": "text",
	"value": "prefilled value",
	"cf-label": "Please insert text"
}

After you have setup your JSON (or loaded..) then you call var cf = window.cf.ConversationalForm.startTheConversation(json) and the Conversation is started.

Formless uses DOM API under the hood to build logic, so you are able to do

console.log(cf.formEl)

Which returns the form element generated from your JSON.

All other functionality of Conversational Form works with Formless.

Please see the above example of how to use Formless to communicate with a web-service and inject new tags at runtime.

Example

See the Pen Conversational Forms - formless by SPACE10 (@space10) on CodePen.