Form body should be URL encoded#86
Form body should be URL encoded#86dinosimone wants to merge 1 commit intoHubspotCommunity:masterfrom
Conversation
|
In my testing this breaks the form submission. You just need to do |
|
Since we've got ActiveSupport can we just call |
|
I don't think so because we don't want to json encode the entire body just the |
|
@chadwilken I've never used Hubspot forms so I don't have any insight here, but do we really want to convert the context to JSON or is it just supposed to be url encoded? |
|
It has to be JSON in the url according to the docs and in my testing.
--
Edit: I removed your address and phone number
|
|
OK cool. I just wanted to make sure that converting it to JSON wasn't the wrong solution but proving the the correct results as a side-effect of conversion and URL encoding. |
|
Looping back on this. I was already encoding context with "Please Note All parameters must be URL encoded before being passed through the API, including |
HubSpot form API states the following:
"Please Note All parameters must be URL encoded before being passed through the API, including the hs_context parameter."
If it's not encoded and request contains URL unsafe characters, it silently fails to submit by creating empty fields.