> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Forms

> Working with forms in CRMScript.

Forms can be processed automatically, manually, or a combination of both. This is specified as [form actions][1].

A form can have multiple actions. One of them is **Execute CRMScript**. If selected, form fields are added as input data to the script set run when submissions of this form are processed (automatically or manually).

The `EventData` instance will contain several input values, where the key is the form field's label. If the form has company or contact fields, these trigger matching against the database, and the input values `contactId` and `personId` are available.

## Update company name with form value

```crmscript theme={null}
EventData ed = getEventData();
Map m = ed.getInputValues();
String contactId = m.get("contactId");
String companyName = m.get("Company - Name");

NSContactAgent agent;
NSContactEntity contact = agent.GetContactEntity(contactId.toInteger());
contact.Name = companyName;
agent.SaveContactEntity(contact);
```

[1]: ../../../../marketing/forms/learn/define-form-actions


## Related topics

- [Forms](/en/api/archive-providers/reference/forms.md)
- [form](/en/api/mdo-providers/reference/form.md)
- [Work with forms](/en/marketing/forms/learn/index.md)
- [Publish forms](/en/marketing/forms/learn/publish.md)
- [form table](/en/database/tables/form.md)
- [FormsAndFolders](/en/api/archive-providers/reference/formsandfolders.md)
