CMS Development

stephenbavister
Member | Diamond Partner
Member | Diamond Partner

How to reference form select dropdown value in HUBL

I have a set of dropdown select fields that have a label and internal value.

 

The internal value is a number and I need to retrieve this internal value via hubl code.

 

At the moment I can only retrieve the label not the internal value via HUBL and can't find any reference in the HUBL library on how to obtain the internal value.

 

Anyone know the reference that I can use to get this?

 

Thanks

0 Upvotes
2 Replies 2
dennisedson
HubSpot Product Team
HubSpot Product Team

How to reference form select dropdown value in HUBL

@stephenbavister, what are you trying to accomplish?  Why does it have to be hubl?  you can get the value pretty easily with jquery

 

mcoley
HubSpot Product Team
HubSpot Product Team

How to reference form select dropdown value in HUBL

There should be an `id` and a `name` value for the select value. It defaults to `name` so you can just do `option.id` for the id.