PHP Class SevenShores\Hubspot\Resources\Forms

Inheritance: extends Resource
Show file Open project: fungku/hubspot-php Class Usage Examples

Public Methods

Method Description
all ( ) : Response Return all forms that have been created in the portal.
create ( array $form ) : Response Create a new form.
delete ( string $form_guid ) : Response Delete an existing form.
getById ( string $form_guid ) : Response Return a single form based on the unique ID of that form.
getFieldByName ( string $form_guid, string $name ) : Response Get a single field from a form.
getFields ( string $form_guid ) : Response Get all fields from a form.
submit ( integer $portal_id, string $form_guid, array $form ) : Response Submit data to a form.
update ( string $form_guid, array $form ) : Response Update an existing form.

Method Details

all() public method

Return all forms that have been created in the portal.
See also: http://developers.hubspot.com/docs/methods/forms/v2/get_forms
public all ( ) : Response
return SevenShores\Hubspot\Http\Response

create() public method

Create a new form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/create_form
public create ( array $form ) : Response
$form array
return SevenShores\Hubspot\Http\Response

delete() public method

Delete an existing form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/delete_form
public delete ( string $form_guid ) : Response
$form_guid string
return SevenShores\Hubspot\Http\Response

getById() public method

Return a single form based on the unique ID of that form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/get_form
public getById ( string $form_guid ) : Response
$form_guid string
return SevenShores\Hubspot\Http\Response

getFieldByName() public method

Get a single field from a form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/get_field
public getFieldByName ( string $form_guid, string $name ) : Response
$form_guid string
$name string
return SevenShores\Hubspot\Http\Response

getFields() public method

Get all fields from a form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/get_fields
public getFields ( string $form_guid ) : Response
$form_guid string
return SevenShores\Hubspot\Http\Response

submit() public method

Submit data to a form.
See also: 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
public submit ( integer $portal_id, string $form_guid, array $form ) : Response
$portal_id integer
$form_guid string
$form array
return SevenShores\Hubspot\Http\Response

update() public method

Update an existing form.
See also: http://developers.hubspot.com/docs/methods/forms/v2/update_form
public update ( string $form_guid, array $form ) : Response
$form_guid string
$form array
return SevenShores\Hubspot\Http\Response