I have a form in Orchar CMS, built with a ViewModel, in present times it take the data and submit with InfusionSoft, now, I need to migrate that method of submission to Hubspot, i can't found what I am looking for in the api documentation, but I need to migrate that and I can't find an example of how to do this, any suggestion or link where I can guide myself please!?!?. Here is an example of my form:
public class CreateTrialUserHubspotViewModel {
[StringLength(50), Required, Display(Name = "First Name")]
public string FirstName { get; set; }
[StringLength(50), Required, Display(Name = "Last Name")]
public string LastName { get; set; }
[StringLength(50), Required, Display(Name = "Job title")]
public string JobTitle { get; set; }
[Display(Name = "inf_option_countryreport")]
public bool Country_Reports { get; set; }
[Display(Name = "inf_option_Economicmodel")]
public bool Economic_Models { get; set; }
}
Then I have a controller that take all the data and submit it, here is an example in the method Register of my controller(This is not the full code)
[HttpPost, Themed]
public ActionResult Register(CreateTrialUserViewModel newTrialUser) {
//Load Form values in this collection
NameValueCollection formData = new NameValueCollection();
formData["inf_form_xid"] = infFormXis;
formData["inf_form_name"] = infFormName;
formData["infusionsoft_version"] = infVersion;
}