> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.forms.FormAction

- Component: `appmixer.utils.forms.FormAction`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.forms 1.2.2](https://connectors.appmixer.com/connector/appmixer.utils.forms/1.2.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.forms/1.2.2/component/appmixer.utils.forms.FormAction>

Create forms and collect entries. Web link with the form will be sent to the 'form' output port. When the form is submitted, the form entries will be sent to the 'entries' output port.

## Properties

_No properties defined._

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Logo URL (`logo`) | text | URL of a logo image to display in the form header and footer. |
| Form Title (`title`) | text | Form Title. |
| Form Description (`description`) | textarea | Form Description. |
| Form Fields (`fields`) | expression | Define your form fields. |
| Call To Action (`cta`) | text | Label of the call-to-action button. |
| Thanks Message (`thanksMessage`) | text | Message displayed to the user after successful form submission. |
| Thanks Image URL (`thanksImage`) | text | Image displayed to the user after successful form submission. |
| Script (`script`) | text | Include JavaScript code. For example Google Analytics Tracking code. |
| Stylesheet (`stylesheet`) | text | Include CSS code to customize look&feel of your forms. |

## Output ports

### Port `form`

| Field | Type | Description |
| --- | --- | --- |
| Web Link (`weblink`) | string | - |

### Port `entry`

Variables are loaded dynamically from `/component/appmixer/utils/forms/FormAction?outPort=entry`.

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.forms.FormAction",
  "author": "David Durman <david@client.io>",
  "description": "Create forms and collect entries. Web link with the form will be sent to the 'form' output port. When the form is submitted, the form entries will be sent to the 'entries' output port.",
  "private": false,
  "webhook": true,
  "properties": {
    "schema": {
      "properties": {
        "generateEntryOutPortOptions": {
          "type": "boolean"
        }
      }
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "logo": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "fields": {
            "type": "object"
          },
          "cta": {
            "type": "string"
          },
          "thanksMessage": {
            "type": "string"
          },
          "thanksImage": {
            "type": "string"
          },
          "script": {
            "type": "string"
          },
          "stylesheet": {
            "type": "string"
          }
        }
      },
      "inspector": {
        "inputs": {
          "logo": {
            "type": "text",
            "label": "Logo URL",
            "tooltip": "URL of a logo image to display in the form header and footer.",
            "index": 2,
            "group": "configuration"
          },
          "title": {
            "type": "text",
            "label": "Form Title",
            "tooltip": "Form Title.",
            "index": 3,
            "group": "configuration"
          },
          "description": {
            "type": "textarea",
            "label": "Form Description",
            "tooltip": "Form Description.",
            "index": 4,
            "group": "configuration"
          },
          "fields": {
            "type": "expression",
            "label": "Form Fields",
            "tooltip": "Define your form fields.",
            "index": 5,
            "levels": [
              "ADD"
            ],
            "fields": {
              "label": {
                "type": "text",
                "label": "Label",
                "index": 1
              },
              "description": {
                "type": "text",
                "label": "Description",
                "index": 2
              },
              "type": {
                "type": "select",
                "label": "Type",
                "variables": false,
                "required": true,
                "options": [
                  {
                    "content": "Text",
                    "value": "text"
                  },
                  {
                    "content": "Number",
                    "value": "number"
                  },
                  {
                    "content": "Date",
                    "value": "date"
                  },
                  {
                    "content": "Email",
                    "value": "email"
                  },
                  {
                    "content": "Checkbox",
                    "value": "checkbox"
                  },
                  {
                    "content": "Color",
                    "value": "color"
                  },
                  {
                    "content": "Password",
                    "value": "password"
                  }
                ],
                "index": 3
              },
              "defaultValue": {
                "type": "text",
                "label": "Default Value",
                "index": 4
              },
              "index": {
                "type": "number",
                "label": "Index",
                "index": 5
              }
            },
            "group": "configuration"
          },
          "cta": {
            "type": "text",
            "label": "Call To Action",
            "tooltip": "Label of the call-to-action button.",
            "defaultValue": "Submit",
            "index": 6,
            "group": "configuration"
          },
          "thanksMessage": {
            "type": "text",
            "label": "Thanks Message",
            "tooltip": "Message displayed to the user after successful form submission.",
            "defaultValue": "Thank you!",
            "index": 7,
            "group": "configuration"
          },
          "thanksImage": {
            "type": "text",
            "label": "Thanks Image URL",
            "tooltip": "Image displayed to the user after successful form submission.",
            "defaultValue": "",
            "index": 8,
            "group": "configuration"
          },
          "script": {
            "type": "text",
            "label": "Script",
            "tooltip": "Include JavaScript code. For example Google Analytics Tracking code.",
            "group": "advanced",
            "index": 1
          },
          "stylesheet": {
            "type": "text",
            "label": "Stylesheet",
            "tooltip": "Include CSS code to customize look&feel of your forms.",
            "group": "advanced",
            "index": 2
          }
        },
        "groups": {
          "configuration": {
            "label": "Configuration",
            "index": 1
          },
          "advanced": {
            "label": "Advanced",
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "form",
      "options": [
        {
          "label": "Web Link",
          "value": "weblink",
          "schema": {
            "type": "string",
            "example": "https://api.example.com/flows/9089f275-f5a5-4796-ba23-365412c5666e/components/0bb33ae5-5fa9-4d3d-a44b-9e4e9a8c7c6b?inputMessageId=4c2a1f7e-8b3d-4e6a-9f10-2d3c4b5a6e7f"
          }
        }
      ]
    },
    {
      "name": "entry",
      "source": {
        "url": "/component/appmixer/utils/forms/FormAction?outPort=entry",
        "data": {
          "properties": {
            "generateEntryOutPortOptions": true
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
