Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Cap on multiple drop-down menu options

I figured out the answer to my preceding question on drop-down menus. However, I have another question: How do I create a drop-down menu which permits the user to select up to 5 (but not more than 5) menu options?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Cap on multiple drop-down menu options

Hello Doz, it depends on how you made the drop-down menu here.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Cap on multiple drop-down menu options

I made the multiple item drop-down menu using the "Select" component. It is a list of occupations. So the 2 problems which I currently face are:

1) When the user selects an occupation or more than one occupation, his selection does not appear in the database. This works for other "Select" component options where the user can only select one option.

2) I need the user to be able to select up to 5 occupations at a time (not more than 5, but can select less than 5).

Thank you.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Cap on multiple drop-down menu options

1) To save user choice to database you would need to create service that updates database data. Do you have such service?

2) If a user can select up to 5 occupations, you should also create a service that adds a record about a user.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Cap on multiple drop-down menu options

The database service is for sign_up and records selections on the "users data" section of the database. I have tried to troubleshoot this problem based on your responses and info from other internet sources. The drop-down menu selection appears in the database if I do not add the attribute for multiple selection, that is, if I do not add "multiple" under "more properties".

Please try to give me a response that helps better.

Also, please explain what you mean by the number 2 response from Max Katz above: "If a user can select up to 5 occupations, you should also create a service that adds a record about a user".

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Cap on multiple drop-down menu options

Is anyone there?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Cap on multiple drop-down menu options

Hello,

I'm sorry but we need more time to post the answer.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Cap on multiple drop-down menu options

Sorry, I didn't understand exactly what you mean in #2. The drop down menu that jQuery Mobile has and we use in Appery.io allows you to select just one item.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Cap on multiple drop-down menu options

I am able to select multiple options when I add the "multiple" attribute under "more properties". The problem is how to get this on the database. Please how do I get the selected items to record in the database table?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Cap on multiple drop-down menu options

Didn't know the menu had such option. Thanks!

You can read the selected values like this:
Appery("component-name").val();

you can also use jQuery select directly.

http://docs.appery.io/javascript-api/

Return to “Issues”