cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Big_S
Level: Powered On

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




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

Community Support Team
Community Support Team

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




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!
Highlighted
Big_S
Level: Powered On

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




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!

View solution in original post

Community Support Team
Community Support Team

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
Level: Powered On

Re: Combo box dont allow user to input text

IT works thank you so muchhh! 🙂

Big_S
Level: Powered On

Re: Combo box dont allow user to input text

Thank you so muchhhh! ❤️

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,807)