Hey @dennisedson was there ever a solution to this? Do I really need to use a regex based on the output JSON just to check if a choice is selected in my Choice field?
I would love to just use something along the lines of “contains” i.e. if user has selected [“title”, “text”] out of my Choice field [“title”, “text”, “button”, “butter”] then I will display fields dependent on “title” and “text” respectively. Seems straight forward enough in a JavaScript way but not sure if HubSpot has something built in.
@tjoycefor the win! That pointed me in the right direction.
How did you arrive at the order of type, href, content_id? Developer info? Whenever I pprint a url field in a module.html file, it has a different order (see code line below).
{"type":"EXTERNAL","content_id":null,"href":""}
I was concerned that HubSpot might swap the order one day, so I built a regex instead. Because the community has been so generous with information, I will include the regex below for anyone who comes across this in the future. Hopefully it will give you some inspiration
Yes, I opened the network tab to see what the dict looked like when it got pulled from the hubspot API. There was a lot of JSON in that network call so it was a little tedious to find but, the curiosity of answering the question got the better of me