APIs & Integrations

nikolajovanovic
Member

Form renders differently on Shareform and form that uses JS API

Hello,

 

One of our customers reported that their Date field ("Birthday") is rendered differently on their ShareForm and differently on our form, which actually uses JS API to render it.

 

  • On Shareform it's rendered as 3 separated fields (month, day and year):

 

nikolajovanovic_0-1639553515972.png

 

nikolajovanovic_1-1639553515909.png

 

  • On our page where we render form via JS API, "Birthday" is rendered as Datepicker:

nikolajovanovic_2-1639553516050.png

 

nikolajovanovic_3-1639553515907.png

 

Is it possible to render 3 separated fields (month, day and year) on forms that are rendered via JS library as well?

 

Thanks,

Nikola

0 Upvotes
5 Replies 5
nikolajovanovic
Member

Form renders differently on Shareform and form that uses JS API

Hi @dennisedson ,

 

Thanks for your reply.

 

I do understand it's possible to submit the externally built form to HubSpot from API.

 

However, we create HubSpot form on our page via "hbspt.forms.create" (https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options) and dynamically send all the form fields to HubSpot API.

 

Can you verify and confirm if that's a bug on your end that form fields are being rendered differently on your shareform and when rendering form via "hbspt.forms.create"?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Form renders differently on Shareform and form that uses JS API

Ah!

Apologies, I misunderstood the question.

The sahre page is using the newer embed code.  We are in the process of rolling it out elsewhere, but I am unsure of the ETA on that.

0 Upvotes
nikolajovanovic
Member

Form renders differently on Shareform and form that uses JS API

Hi @dennisedson ,

Looking forward to see "how I should be able to format it however I want". :))

 

Let me know when you have the answer.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Form renders differently on Shareform and form that uses JS API

Using this forms endpoint ,you can submit form data from an external form that you would create without having to use a HubSpot form on the website. 

Per the docs,

We recommend creating a unique form in HubSpot to parallel your custom website form. This will make it easy to track submissions on that particular custom form in the future.

 

So you should create a form in hubspot that will have the same fields as your custom form.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Form renders differently on Shareform and form that uses JS API

@nikolajovanovic 

To make sure we are clear, the form that is being rendered via the forms api includes a datepicker.  You want it to be 3 fields.  

If you are using the forms api, you should be able to format it however you want.  @piersg  might be able to help out more.

0 Upvotes