# Cannot get value from "Select input"

**URL:** <https://community.hubspot.com/t/cannot-get-value-from-select-input/75746>\
**Category:** APIs & Integrations\
**Tags:** free, starter\
**Created:** [February 22, 2023, 4:01pm UTC](https://community.hubspot.com/t/cannot-get-value-from-select-input/75746 "2023-02-22T16:01:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IDev2](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@IDev2](https://community.hubspot.com/u/IDev2)\
**Post date:** [February 22, 2023, 4:01pm UTC](https://community.hubspot.com/t/cannot-get-value-from-select-input/75746/1 "2023-02-22T16:01:13Z")

</div>

Hello. I’m using this documentation to get value from Select Input: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/platform/create-custom-cards-with-projects#select-input)

But the result unsuccessful. Probably you can help me.

The source code:

exports.main = async (context, sendResponse) =\> {  
const { event } = context;

if (event && event.type === ‘SUBMIT’) {  
const { example\_input } = event.payload.formState.select\_input;

sendResponse({  
message: {  
type: ‘SUCCESS’,  
body: `Form submit was successful. Input’s value: ${example_input}`,  
},  
});  
}

sendResponse({  
sections: [  
{  
“type”: “form”,  
“content”: [  
{  
“type”: “select”,  
“name”: “select\_input”,  
“label”: “Single select list”,  
“placeholder”: “Select a value”,  
“options”: [  
{  
“value”: 42,  
“label”: “Option 1”  
},  
{  
“value”: true,  
“label”: “Option 2”  
},  
{  
“value”: “a string”,  
“label”: “Option 3”  
}  
]  
},  
{  
“type”: “button”,  
“text”: “Submit form”,  
“onClick”: {  
“type”: “SUBMIT”,  
“serverlessFunction”: “crm-card”  
}  
}  
]  
}  
]  
});  
};

---

<div class="post-metadata">

**Author:** ![kvlschaefer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kvlschaefer/32/71076_2.png) [@kvlschaefer](https://community.hubspot.com/u/kvlschaefer)\
**Post date:** [February 23, 2023, 9:54pm UTC](https://community.hubspot.com/t/cannot-get-value-from-select-input/75746/2 "2023-02-23T21:54:32Z")

</div>

Hi @IDev2,

Thanks for your question.

Can you include any additional details or screenshots? For example, are you getting a response, but not the one you expect? An error and error message? Or something else? This context helps the community to understand your issue.

Hey, @stefen @ChrisoKlepke, do you have any suggestions? Or thoughts on how they can troubleshoot their project?

Thank you!

Best,

Kristen

---

<div class="post-metadata">

**Author:** ![SBista](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@SBista](https://community.hubspot.com/u/SBista)\
**Post date:** [March 8, 2023, 5:32pm UTC](https://community.hubspot.com/t/cannot-get-value-from-select-input/75746/3 "2023-03-08T17:32:48Z")

</div>

Change

**const { example\_input } = event.payload.formState.select\_input;**

to:

\*\*const { example\_input } =

context.

event.payload.formState.select\_input;\*\*
