Form Builder
This is a configuration section of Custom MT. Use this configuration to create Machine Translation settings forms with various form elements.
Object Structure
type:
string"string"
"number"
"object"
form:
string"input-text"
"input-number"
"input-range"
"input-password"
"select"
"textarea"
name:
stringtitle:
stringdefault:
string|numberoptions:
Array of objects<{name: string, value: string}> (optional)styles:
object(optional)launcher:
object<show: boolean, fullwidth: boolean> (optional)
{
"formBuilder": [
{ "type": "string", "form": "input-text", "name": "api_key", "title": "API Key*", "default": "",
"launcher": { "show": true }
},
{ "type": "string", "form": "select", "name": "formality", "title": "Formality", "default": "default",
"options": [
{ "name": "Default", "value": "default" },
{ "name": "Formal", "value": "more" },
{ "name": "Informal", "value": "less" },
{ "name": "Formal (if available)", "value": "prefer_more" },
{ "name": "Informal (if available)", "value": "prefer_less" }
],
"launcher": { "show": true }
},
{ "type": "string", "form": "select", "title": "Preserve Formatting", "name": "preserve_formatting", "default": "0",
"options": [
{ "name": "No (default)", "value": "0" },
{ "name": "Yes", "value": "1" }
],
"launcher": { "show": true }
}
]
}