Browse Source

form step example with concrete data

pull/83/head
Louise Foussat 5 years ago committed by Clément
parent
commit
8bf0bc3e7c
  1. 52
      docs/modular-steps-management.md

52
docs/modular-steps-management.md

@ -76,88 +76,92 @@ Here is an example of the form step's attributes. It presents a form with two se
"subtype": "form-step", "subtype": "form-step",
"form": { "form": {
"section1": { "section1": {
"title": "My section title", "title": "Identification",
"inputs": { "inputs": {
"typeText": { "firstName": {
"index": 0, "index": 0,
"placeholder": "Text placeholder", "placeholder": "First name",
"maxLength": 50, "maxLength": 50,
"type": "text", "type": "text",
"required": true "required": true
}, },
"typeTel": { "tel": {
"index": 1, "index": 1,
"required": true, "required": true,
"type": "tel", "type": "tel",
"label": "Tel label", "label": "Phone number",
"placeholder": "+333 33 33 33 33", "placeholder": "+333 33 33 33 33",
"pattern": "[+][3][0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" "pattern": "[+][3][0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}"
}, },
"typeTextArea": { "medicalInfo": {
"label": "Textarea label", "label": "Medical informations",
"placeholder": "Medical Informations",
"index": 7, "index": 7,
"maxLength": 250, "maxLength": 250,
"placeholder": "Textarea placeholder",
"type": "textarea" "type": "textarea"
}, },
"typeDate": { "dateOfBirth": {
"index": 2, "index": 2,
"required": true, "required": true,
"type": "date", "type": "date",
"label": "Date of birth",
"min": "1621-07-08", "min": "1621-07-08",
"max": "2019-01-01", "max": "1900-01-01",
"label": "Date label",
"value": "2000-01-01" "value": "2000-01-01"
}, },
"typeCountries": { "country": {
"index": 4, "index": 4,
"id": "countries", "id": "countries",
"type": "countries", "type": "countries",
"required": true, "required": true,
"emptyItem": { "label": "Select your country label" } "emptyItem": { "label": "Select your country label" }
}, },
"typeSelect": { "gender": {
"index": 3, "index": 3,
"type": "select", "type": "select",
"id": "typeSelect", "id": "genders",
"required": true, "required": true,
"emptyItem": { "label": "Special emply item" }, "emptyItem": { "label": "Select your gender" },
"items": [ "items": [
{ "label": "Male", "data": "male" },
{ "label": "Female", "data": "female" }
{ "label": "Item 1", "data": "item1" }, { "label": "Item 1", "data": "item1" },
{ "label": "Item 2", "data": "item2" } { "label": "Item 2", "data": "item2" }
] ]
}, },
"typeRadio": { "environment": {
"index": 5, "index": 5,
"type": "radio", "type": "radio",
"required": true, "required": true,
"label": "Radio label - choose your radio", "label": "Which environment do you live in ?",
"inlineBlock": true, "inlineBlock": true,
"items": [ "items": [
{ "label": "City", "data": "city" },
{ "label": "Countryside", "data": "countryside" }
{ "label": "Radio 1", "data": "radio1" }, { "label": "Radio 1", "data": "radio1" },
{ "label": "Radio 2", "data": "radio2" } { "label": "Radio 2", "data": "radio2" }
] ]
}, },
"typeSwitch": { "programmingAbilities": {
"index": 6, "index": 6,
"type": "switch", "type": "switch",
"label": "Switch label", "label": "I am new in programming",
"value": true "value": true
}, },
"typeCheckbox": { "generalConditions": {
"index": 8, "index": 8,
"type": "checkbox", "type": "checkbox",
"label": "Checkbox label", "label": "I have read and I accept the general conditions",
"value": false "value": false
} }
} }
}, },
"section2": { "section2": {
"title": "My second section title", "title": "More about you",
"inputs": { "inputs": {
"typeText": { "favoriteColor": {
"index": 0, "index": 0,
"placeholder": "Text placeholder", "placeholder": "Your favorite color",
"type": "text", "type": "text",
"required": true "required": true
} }

Loading…
Cancel
Save