App Inventor and HTML/JavaScript with Input Parameters


Multiple Choice Select: a Listpicker alternative for App Inventor

Meanwhile we have different possibilities in App Inventor to pick an item from a list: listpicker, listview and spinner. But we only can select one item! The solution presented here offers a multiple choice combobox.

The user can select multiple items. The selected item id(s) will be displayed in this example in a label in csv format. Thank you DaveRandom! and JohnP! Your JavaScript example and JQuery snippet helped me to set up this solution.

Using the WebViewString property means, there is no download of files necessary anymore, all required libraries and the HTML/JavaScript file are uploaded as assets into the app.

The tools extension offers the method PathToAssets which always returns the correct path to the assets.

Screenshots


By the way: the Cancel button changes automatically according to the language of the device. So if you use e.g. German as language, you will get an "Abbrechen" button instead.

App Inventor Blocks

Questions and Answers

Q1: How do I change the initial lists? For example, I want to delete "five cats" and "one elephant" to other things like "spanish" and "french"?
A: Learn How to work with Lists (by Saj) and How to work with Lists and Lists of lists (pdf) (by appinventor.org)

Q2: After clicking "ok", the "selected ids" display numbers "1,2", but I want it to display the actual items like "five cats" and "one elephant", so how should I do that?
A: use select list item blocks and display the corresponding items from the list. Please do the tutorials to learn the basics, see also Top 5 Tips: How to learn App Inventor

Download

You can test with the apk file, which is available for download here: Download apk file

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Buy the source code for App Inventor


You can buy the source code of this project.
With your payment you accept the terms and conditions below.

Payment options

1. Paypal

Please transfer 10 USD via Paypal
to Pura Vida Apps

2. Bitcoin

After having received your payment I will be happy to send the source code to you.
Thank you! Taifun


Please check your spam folder in case you did not receive the example!
I usually will send the project not later than 24 hours after having received your payment.

 

Terms and Conditions

Back to top of page ...


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact