* Add a new key **subtype** of type `String` with the exact value 'form-step'
* Add a new key **subtype** of type `String` with the exact value 'form-step'
* Add a new key **form** of type `Object`
* Add a new key **form** of type `Object`
* Form can have several sections. Each section is displayed with a title, and its inputs.
* Form can have several sections. Each section is displayed with a title, and its inputs.
@ -48,12 +49,14 @@
> The values will be considered as the properties of your input.
> The values will be considered as the properties of your input.
#### Defining an input:
#### Defining an input:
* A **type** key of type `String` must be declared. It defines the type of the input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea`, `countries`.
* A **type** key of type `String` must be declared. It defines the type of the input : `tel`, `text`, `date`, `select`, `radio`, `switch`, `checkbox`, `textarea`, `countries`.
* All other attributes needed for the input can be added to the object, according to the input type: `placeholder`, `id`, `required`, `label`, `items`, `emptyItems`, `index`, etc...
* All other attributes needed for the input can be added to the object, according to the input type: `placeholder`, `id`, `required`, `label`, `items`, `emptyItems`, `index`, etc...
#### Important indication:
#### Important indication:
* The **index** property is used to order the inputs. It will not be passed onto the input. Be mindful not to set the same index twice.
* The **index** property is used to order the inputs. It will not be passed onto the input. Be mindful not to set the same index twice.
* The **type** property is required. It will be used to determine the kind of input should be generated. It is passed onto 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)
* The **type** property is required. It will be used to determine the kind of input should be generated. It is passed onto 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)
* A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app.
* A special type 'countries' has been added to the classicals. It generate a `Select` (containing all the countries) with a search bar. 'Items' property is handled by the app.
* It's recommended to add 'min' and 'max' properties to input type 'date' (no default value are set).
* It's recommended to add 'min' and 'max' properties to input type 'date' (no default value are set).
* `onChange` prop are ignored as the event is handled by the app.
* `onChange` prop are ignored as the event is handled by the app.
@ -69,6 +72,7 @@
### Examples
### Examples
Here is an example of the form step's attributes. It presents a form with two sections, and an example of each kind of input type.
Here is an example of the form step's attributes. It presents a form with two sections, and an example of each kind of input type.
> NB : this example object is provided in the admin, in the onboarding section: 'Form step example'.
> NB : this example object is provided in the admin, in the onboarding section: 'Form step example'.
```json
```json
@ -169,6 +173,7 @@ Here is an example of the form step's attributes. It presents a form with two se
@ -188,6 +193,7 @@ The newly created child can be customized with these attributes :
1. Edit you step object
1. Edit you step object
2. Go to *Object attributes*
2. Go to *Object attributes*
3. Add the following attributes:
3. Add the following attributes:
* Add a new key **subtype** of type `String` with the exact value 'sign-step'
* Add a new key **subtype** of type `String` with the exact value 'sign-step'
* Add a new key **text** of type `String` with the text of your document to sign as value
* Add a new key **text** of type `String` with the text of your document to sign as value
* Add a new key **buttonText** of type `String` with the text that you want to display in the submit button of your step. Default value for this attribute is 'Sign'.
* Add a new key **buttonText** of type `String` with the text that you want to display in the submit button of your step. Default value for this attribute is 'Sign'.
Write a program that takes a string as a parameter, and prints its words in reverse.
- A word is a sequence of **alphanumerical** characters.
- If the number of parameters is different from 1, the program will display `\n`.
- In the parameters that are going to be tested, there will not be any additional spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the string, and words will always be separated by exactly one space).
Examples of outputs :
```console
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test "the time of contempt precedes that of indifference"
indifference of that precedes contempt of time the