Forms - electric-cloud/PluginWizard GitHub Wiki
Every procedure should have a form. The form is declared in a file named form.xml.
A form usually has multiple declarations of fields, enclosed within <editor></editor>
tag.
Each form element is described within <formElement>
tag. For every field, there are required properties to be filled:
- property - the name of the parameter. Should be ASCII without spaces.
- required = 1|0 - defines if the parameter is required.
- label - Human-readable label.
- documentation - description of the parameter, samples, etc. Should not contain HTML tags.
- htmlDocumentation - description of the parameter, samples, usage, etc. Can contain HTML tags.
- type - the type of the parameter. See description below.
Since EF 8.5 all forms should also have a tag <formXmlCompliant>true</formXmlCompliant>
to switch to React rendering in Flow UI.
A field can be shown conditionally.
<dependsOn>anotherField</dependsOn>
<condition>${anotherField} != '' AND ${anotherField} == 'someValue'</condition>
Simple field. Cannot contain newlines.
If it is a field for the configuration name, it should contain tag <configuration>1</configuration>
.
Wide textarea field.
Checkbox. Can contain additional properties:
- checkedValue - value returned for the parameter when it is checked. E.g. "true", "1".
- uncheckedValue - value returned for the parameter when it is unchecked. E.g. "false", "0".
- initiallyChecked - defines if the checkbox is checked by default.
Fixed dropdown list. Should also contain options, e.g.
<formElement>
<type>select</type>
<property>mySelect</property>
<label>My Select:</label>
<option>
<name>First Option</name>
<value>firstOption</value>
</option>
</formElement>
A special "credential" parameter. Based on credentialType
, can look like:
- Three fields, one for username and two for the password OR field for choosing a credential in a context of pipeline: this is default.
- secret - single field for secret values.
- key - one field for a username and one for a key. Can be used to store private keys.
Credential parameter should be attached to the step which is going to call it. Use tag <attachedAsParameterToStep>createAndAttachCredential</attachedAsParameterToStep>
for this. Steps in the tag are separated by a comma.
Additional labels:
- userNameLabel - custom label for a username field.
- passwordLabel - custom label for a password field.
- keyLabel - custom label for a key field.
- retypePasswordLabel - custom label for the second password field.