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

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
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

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
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


Big_S Helper IV
Helper IV

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.

 

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

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

Big_S Helper IV
Helper IV

Re: Combo box dont allow user to input text

IT works thank you so muchhh! 🙂

Big_S Helper IV
Helper IV

Re: Combo box dont allow user to input text

Thank you so muchhhh! ❤️

Helpful resources

Announcements
secondImage

Community User Group Member Badges

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

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,136)