From 2ee4213a1189b455c358a64a5f310f1f0f5e60af Mon Sep 17 00:00:00 2001 From: Louise Foussat Date: Mon, 22 Apr 2019 20:37:28 +0100 Subject: [PATCH] add some space --- doc/create-steps.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/create-steps.md b/doc/create-steps.md index 6a31be57..74a9eb23 100644 --- a/doc/create-steps.md +++ b/doc/create-steps.md @@ -21,21 +21,28 @@ Every step that you want to create must : --- -To create a step, you must: +#### To create a step, you must: 1. Create a new object for your step in the admin (in *Admin* > *Add new object*) + Capture d’écran 2019-04-22 à 15 57 37 Capture d’écran 2019-04-22 à 15 58 21 + * The title of your object will be the title displayed for the step you're creating. Use a intellegible title for your user. * This object must have the same type as your major object ("signup" for the sign up phase, "onboarding" for the administration part of the onboarding) > Your step is then available in the *Admin*. You can find it in the section of its type (*SignUp* or *Onboarding*) or thanks to the search bar of the cursus object's page. - + + 2. Add this new object as a child of your parent object + 1. Edit the parent object (*Sign up* or *Administration*) + Capture d’écran 2019-04-22 à 19 24 23 Capture d’écran 2019-04-22 à 19 24 10 + 2. Go to *Children* > *Add a child* ![add child to major object](https://user-images.githubusercontent.com/35296671/56506977-de50c800-6517-11e9-9c71-d19a1ec4e5cd.png) + 3. Set up the new child: * Enter its name in the input "Add a child name" * Select you child in the select input @@ -53,10 +60,14 @@ To create a step, you must: > 2. form ### Description -###### Edit the step object you've created : + +#### Edit the step object you've created : 1. Go to *Object attributes* + Capture d’écran 2019-04-22 à 15 59 33 + 2. Add the attributes: + * Add a new key **subtype** of type `String` with the exact value 'onb-adm-form-generator' * Add a new key **form** of type `Object` * The form you're creating can have several sections. Each section is displayed with a title, and its inputs. @@ -66,11 +77,11 @@ To create a step, you must: * An **inputs** key of type `Object`, which will contain all the inputs of the section. For each input you want to add, you must set up the input as this : * Add a new `Object` element in the "inputs" object. The key of this object will be used as the "name" attribute of your input. The values will be considered as the props of your input. -###### Set up of an input props: +#### Set up of an input props: * You must declare a **type** key of type `String`, wich define the type of your input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea`. * Then you can fill the props you need for your input, according to its type : `placeholder`, `id`, `required`, `label`, `items`, `emptyItems`, `index`, etc. -###### Important indication: +#### Important indication: * The **index** property is used to order your inputs. It won't be spread in the input. * The **type** property is resquired. It will be used to determine the kind of input we must generate. It is spread in the input only if the input type attribute is required (type 'tel' or 'text' for example, but not for type 'select' - in this case, we will generate a select element) * We're creating a special type 'countries' (select displaying all the countries). Documentation will be updated as soon as it's available.