diff --git a/README.md b/README.md index acaef1b..34790a0 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,28 @@ The mandatory template.json file's structure is the following. - "fields" - array of used variables by service An element of fields can contain the following keys. - - description - - key - - value - - required - - type - - generated + - description - label of the field, this text will appear before element + - key - name of variable + - value - default value of variable in the form + - required - if set "true" then fill in of the field is required in the form + - type - if not set then default is text, available field types: text, password, textarea, select + - if type is "select" then options are separated by ",". Option's value and text is separated by ":", but text is not mandatory. For example: -For example: - { - "description": "Please add Nextcloud password:", - "key": "NEXTCLOUD_PASSWORD", - "value": "", - "required": "true", - "type": "password" - }, + "value": "yes,no" + "value": "1:gmail,2:microsoft outlook/hotmail,3:other", + + - generated - the value of the variable is auto generated, so the field will not appear in the form. Generated examples: + + "time|md5|8" - generated from time, encoded by md5 and character length is 8 + "random|md5|20" - random generated number, encoded by sha256, length is 20 + +Field element example: + + { + "description": "Please add Nextcloud password:", + "key": "NEXTCLOUD_PASSWORD", + "value": "", + "required": "true", + "type": "password" + },