This source plugin for Gatsby will provide you with the associated fields for each applicable form created in Hubspot.
Installation
npm i gatsby-source-hubspot-forms
Configuration
In gatsby-config.js
:
module.exports = {
plugins: [
{
resolve: "gatsby-source-hubspot-forms",
options: {
apiKey: "YOUR_HUBSPOT_API_KEY",
},
},
],
}
Querying Hubspot Forms
Once the plugin is configured, two new queries are available in GraphQL: allHubspotForm
and HubspotForm
.
Here’s an example query to load 10 forms:
query HubSpotFormQuery {
allHubspotForms(limit: 10) {
edges {
node {
portalId
name
submitText
redirect
formFieldGroups {
fields {
label
name
required
fieldType
}
}
}
}
}
}
See the Hubspot forms API docs or the GraphiQL UI for info on all returned fields.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4