cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Combo box dont allow user to input text

Hi Guys,
I have this concern, how to set the combo box so that the user will not able to input text? they will just select the items on it.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: Combo box dont allow user to input text

Ok, well we can do that too Cat Happy

 

So if we allow searching, but we don't want the item to submit unless there is a selected value, we set the field to required, or we can change the Submit action.

 

For your Submit button, have it check:

If( IsBlank(Combobox1.selectedItems.Property),
//If blank then let them know they need to choose
Notify("Please choose an item from the dropdown", notificationtype.warning),
//If not blank, ie an item is chosen, then submit the form
Submit(FormName)
)

NB - Property will need to be the value or thing within that selectedItem like .name .Title .displayName etc - use intellisense to figure out which will work for you.

 

you can check this with a label during testing:

image.png

image.png

 

Could you give something like that atry and let me know if you run into any issues or if it solved your problem?

 

Cheers,

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Highlighted
Community Support
Community Support

Re: Combo box dont allow user to input text

Hi @Big_S ,

Could you please share a bit more about your scenario?

Do you want to not save your form data if the user type a text which is not available within the ComboBox?

 

I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the "Submit" button to following:

If(
   IsEmpty(ComboBox1.SelectedItems),
   Notify("Please choose a proper item within the ComboBox, not type a unavailable option!", NotificationType.Error),
   SubmitForm(EditForm1)
)

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Combo box dont allow user to input text

Hi,

 

In the settings for a combobox, you will see the following setting:

image.png

 

Turning this off forces the user to choose - they will not be allowed to type in.

 

Cheers,

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Highlighted
Helper V
Helper V

Re: Combo box dont allow user to input text

Hi @iAm_ManCat ,

It works, however searching is a big part for the user, I just wanted if they will type in and not in the combo box list of items it won't save the records.

 

Highlighted
Super User
Super User

Re: Combo box dont allow user to input text

Ok, well we can do that too Cat Happy

 

So if we allow searching, but we don't want the item to submit unless there is a selected value, we set the field to required, or we can change the Submit action.

 

For your Submit button, have it check:

If( IsBlank(Combobox1.selectedItems.Property),
//If blank then let them know they need to choose
Notify("Please choose an item from the dropdown", notificationtype.warning),
//If not blank, ie an item is chosen, then submit the form
Submit(FormName)
)

NB - Property will need to be the value or thing within that selectedItem like .name .Title .displayName etc - use intellisense to figure out which will work for you.

 

you can check this with a label during testing:

image.png

image.png

 

Could you give something like that atry and let me know if you run into any issues or if it solved your problem?

 

Cheers,

ManCat


@iAm_ManCat

Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Highlighted
Community Support
Community Support

Re: Combo box dont allow user to input text

Hi @Big_S ,

Could you please share a bit more about your scenario?

Do you want to not save your form data if the user type a text which is not available within the ComboBox?

 

I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the "Submit" button to following:

If(
   IsEmpty(ComboBox1.SelectedItems),
   Notify("Please choose a proper item within the ComboBox, not type a unavailable option!", NotificationType.Error),
   SubmitForm(EditForm1)
)

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper V
Helper V

Re: Combo box dont allow user to input text

IT works thank you so muchhh! 🙂

Highlighted
Helper V
Helper V

Re: Combo box dont allow user to input text

Thank you so muchhhh! ❤️

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,257)