You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/hubspot/actions/create-form/create-form.mjs
+93-1Lines changed: 93 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,99 @@ export default {
27
27
fieldGroups: {
28
28
type: "string[]",
29
29
label: "Field Groups",
30
-
description: "A list for objects of group type and fields. **Format: `[{ \"groupType\": \"default_group\", \"richTextType\": \"text\", \"fields\": [ { \"objectTypeId\": \"0-1\", \"name\": \"email\", \"label\": \"Email\", \"required\": true, \"hidden\": false, \"fieldType\": \"email\", \"validation\": { \"blockedEmailDomains\": [], \"useDefaultBlockList\": false }}]}]`** [See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for more information.",
30
+
description: `Array of stringified JSON objects defining form field groups. Each string must contain a complete field group object.
- \`"CHECKED"\`, \`"NOT_CHECKED"\` - Checkbox states
109
+
110
+
**COMPLETE EXAMPLE:**
111
+
\`[
112
+
"{\"groupType\":\"default_group\",\"richTextType\":\"text\",\"richText\":\"<h3>Contact Info</h3>\",\"fields\":[{\"objectTypeId\":\"0-1\",\"name\":\"email\",\"label\":\"Email\",\"fieldType\":\"email\",\"required\":true,\"hidden\":false,\"validation\":{\"useDefaultBlockList\":true},\"dependentFields\":[],\"placeholder\":\"you@example.com\",\"description\":\"We'll never share your email\"},{\"objectTypeId\":\"0-1\",\"name\":\"company_type\",\"label\":\"Company Type\",\"fieldType\":\"dropdown\",\"required\":true,\"hidden\":false,\"validation\":{},\"dependentFields\":[{\"fieldName\":\"enterprise_fields\",\"objectTypeId\":\"0-1\",\"controllingValue\":\"enterprise\",\"condition\":\"EQUAL\",\"active\":true}],\"options\":[{\"label\":\"Small Business\",\"value\":\"small\"},{\"label\":\"Enterprise\",\"value\":\"enterprise\"}]}]}"
113
+
]\`
114
+
115
+
**IMPORTANT NOTES:**
116
+
- Each array item must be a valid JSON string (use JSON.stringify if building programmatically)
117
+
- ALL field properties listed as required MUST be included, even if empty
118
+
- Field names must be unique within their objectTypeId
119
+
- Hidden dependent fields should have \`"hidden": true\` initially
120
+
- For HubSpot default fields, use standard names: "email", "firstname", "lastname", "phone", "company"
121
+
122
+
[See the documentation](https://developers.hubspot.com/docs/reference/api/marketing/forms#post-%2Fmarketing%2Fv3%2Fforms%2F) for additional details.`,
0 commit comments