Common Form Properties

Properties shared by every form type


These properties apply to all form types — ansible, awx, multistep, and subform.

All other properties are type-specific and documented on the page of the respective form type.

Each form in the forms list is configured with the below attributes.


Properties

The properties shared by all form types:

Attribute Comments
name
string / required / unique

The name of the form
alphanumeric + dash + underscore + space

The name of a form is also the identifier of the form and thus must be unique.
For simplicity we have chosen not to some sore of guid as unique identifier. This does mean, however, that when your rename a form any reference to it will be broken.

description
string

Form description
free text

A short description, explaining what the form does.

help
string

Help
valid markdown

Using markdown you can a more detailed help message to help the operator understand the form.

Examples:

1) blockquote with title, list, italic and bold

> #### The quarterly results look great!
>
> - Revenue was off the chart.
> - Profits were higher than ever.
>
>  *Everything* is going according to **plan**.     
type
string

Form type

Our form eventually sends extravars to a target. That target can be an ansible-playbook, an awx-template, a multistep (a sequence of playbooks/templates), or a subform (a reusable form fragment used as the per-row editor of a list field or the single-object editor of a yaml field).

Choices:
  • ansible
  • awx
  • multistep
  • subform

Examples:

1) Run AWX Template Create VM

name: Create vm
type: awx
roles:
  - public
fields: []
template: Create VM       

2) Run Delete VM playbook

name: Delete vm
type: ansible
roles:
  - public
fields: []
playbook: delete_vm.yaml

3) Run multistep job

name: Trigger awx job
type: multistep
roles:
  - public
fields: []
steps:
- name: Create vm
  type: awx
  template: create_vm        
- name: Start vm
  type: awx
  template: start_vm                                 
fields
array

fields
🔗 valid field object

It makes sense that a form has 1 or more formfields. Read more about them in the separate formfield section.

Examples:

1) Examples

fields:
  - name : name
    label: Your name
    type: text
    required: true
  - name : email
    label: Your email
    type: text
    regex:
      expression: '^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$'
      description: Please enter a valid email address
    required: true