hubspotex v0.0.6 Hubspot.Forms
Summary
Functions
Return all forms that have been created in the portal
Create a new form
Delete an existing form
Return a single form based on the unique ID of that form
Get a single field from a form
Get all fields from a form
Submit data to a form
Update an existing form
Functions
Return all forms that have been created in the portal.
see: http://developers.hubspot.com/docs/methods/forms/v2/get_forms
Example
iex> Hubspot.Forms.all()
%Hubspot.HTTP.Request{endpoint: "/forms/v2/forms",
method: :get, body: "", query: []}
Create a new form.
see: http://developers.hubspot.com/docs/methods/forms/v2/create_form
Example
iex> Hubspot.Forms.create([])
%Hubspot.HTTP.Request{endpoint: "/forms/v2/forms",
method: :post, body: [], query: []}
Delete an existing form.
see: http://developers.hubspot.com/docs/methods/forms/v2/delete_form
Example
iex> Hubspot.Forms.delete("1234-abcd")
%Hubspot.HTTP.Request{endpoint: "/forms/v2/forms/1234-abcd",
method: :delete, body: "", query: []}
Return a single form based on the unique ID of that form.
see: http://developers.hubspot.com/docs/methods/forms/v2/get_form
Example
iex> Hubspot.Forms.getById("1234-abcd")
%Hubspot.HTTP.Request{endpoint: "/forms/v2/forms/1234-abcd",
method: :get, body: "", query: []}
Get a single field from a form.
see: http://developers.hubspot.com/docs/methods/forms/v2/get_field
Example
iex> Hubspot.Forms.getFieldByName("1234-abcd", "some_field")
%Hubspot.HTTP.Request{endpoint: "/forms/v2/fields/1234-abcd/some_field",
method: :get, body: "", query: []}
Get all fields from a form.
see: http://developers.hubspot.com/docs/methods/forms/v2/get_fields
Example
iex> Hubspot.Forms.getFields("1234-abcd")
%Hubspot.HTTP.Request{endpoint: "/forms/v2/fields/1234-abcd",
method: :get, body: "", query: []}
Submit data to a form.
see: http://developers.hubspot.com/docs/methods/forms/submit_form
Send form submission data to HubSpot. Form submissions from external sources can be made to any registered HubSpot form. You can see a list of forms on your portal by going to the Contacts > Forms page
Example
iex> Hubspot.Forms.submit(1234, "1234-abcd", [])
%Hubspot.HTTP.Request{endpoint: "https://forms.hubspot.com/uploads/form/v2/1234/1234-abcd",
method: :post, body: [], query: []}
Update an existing form.
see: http://developers.hubspot.com/docs/methods/forms/v2/update_form
Example
iex> Hubspot.Forms.update("1234-abcd", [])
%Hubspot.HTTP.Request{endpoint: "/forms/v2/forms/1234-abcd",
method: :post, body: [], query: []}