Jquery-mobile's Multiselect control - jquery-mobile

How can we achieve to select all options in a multiselect control of the jquery-mobile framework?

Let us ask the question another way. How can we best give users a way to select multiple related items in jquery mobile. Select dropdowns present their own UX failings to begin with in that they require work on the part of the user to see what the options even are. Mobile devices only compound the issue with their differing implementations of the control.
Instead, try this using grouped checkboxes. http://jquerymobile.com/demos/1.0/docs/forms/checkboxes/
You will have more control over how the information is displayed and users will find it easier to see all the options at once.

Related

Using md-select and md-autocomplete together

I'm trying to allow the users of my app to choose a single item in a big select (~2500 possibilities). So, as I already implemented md-chips with md-autocomplete in another app, I thought that all I had to do was to the same with a md-select. To my surprise, I didn't find a way to do that.
So basically I have 3 choices :
use md-chips but I can't limit them to one chip, I can show an error if two or more are chosen, but that's a rather weird UX to let the user choose two things and then alert them they can't.
use md-select, but from what I gathered, I can't use md-autocomplete, so choosing between 2500 objects is tedious
use md-autocomplete, but (not sure :) there's no ng-model, and worst my user can write about anything while I just want them to select one item
I'm sure I missed something in the docs, I just can't find a way to allow my users to select one and only one item with autocomplete.
Anyone ?

Is it possible to have options on select change from when other select changes without javascript

There are a bunch of question on this but no answers on how to do it without javascript.
If you have one form that has 2 select boxes. The second select box has different options based on what you choose for the first select box. Here is a js example. Not all users have js enabled so for these users this option would be unavailable.
Can this be achieved solely using CSS3, HTML5 and Ruby? I would show what I've got so far in trying this but I got nothing.
What you are asking is how to manipulate the DOM after it has loaded without a client-side scripting language. This is not possible as far as I am aware; unfortunately that is not what you want to hear.
The proper solution in this case would be to have the user submit the page and generate the second selection box at that time. You will have to rely entirely on server-side logic to handle the problem. So basically something like:
Serve a page with just a single selection box
When the page is posted generate a similar page where the first selection is locked and display a second selection box with the possible options.
Continue the iteration until you have all of the required selections filled out by the user.
Serve the result that the user requested.

Does jQuery Mobile have a (true) combo-box?

I am searching for a way to create a combo-box in jQuery Mobile, but there seems to be a lot of confusion between a combo-box and a select (drop-down) box.
My definition, which I learned back when dinosaurs were using Windows 3.0, is that a select box allows you to choose from a drop-down list. A combo-box does this, but adds the ability to type anything at all (a 'combo' of a selection drop-down and a text input). These days, from my searching, the distinction seems to have been lost, which is making it extremely difficult to track down info about true combo-boxes.
I like jQuery Mobile's over-all simplicity, and I love the auto-search/complete feature that displays matching options as you type which is 90% of what I need, but I want to capture whatever the user enters, whether it is on the list of options or not. Can I do this without headache / major work / another plug-in?
jQuery has combo box, but not JQM...
try this url: devcurry.com/2011/05/jquery-editable-combo-box.html maybe u can customize it...

jQuery tabs with dynamic pages

I have a little problem with jQuery Tabs.
I get it to work well. But when I open the pages dynamically (eg. I click to open a new tab for a product) it may be several tabs open to different products. But each side has of course the same id and so on (eg. div tags). This means that when I change something on another tab so it's affecting the other tabs.
How do you solve this problem?
You can use a scalar ID (1,2,3,4,5, ecc) for these DIVs and just store the "reference ID" in another field.
The use of the same ID for different nodes is just a bad practice. It also breaks the validation of your document.
Take a look at the .data() method on jQuery that allow you to store data in an arbitrary way

Rails 3.1 interface design - Cascading dropdown, form input

For a case where I have models like:
Coutries
States
Cities
Opinions
I'd like to begin with just presenting a user with a dropdown for Coutries.
Once a country is selected, then a States dropdown would appear below Countries.
Once a State is selected, then a Cities dropdown would appear below States.
Once a City is selected, a textboxt appears and the user writes their opinion of the city.
Once text is placed in the textbox, a 'submit' button appears.
Once the user clicks 'submit' I process the form data.
I'd like to populate each dropdown from a corresponding table using the previous selection to limit the dropdown items.
I'd like the same sort of functionality with checkboxes too.
Basically, I'd like to be able to define a cascading form input scheme. I have seen some information on the topic, but nothing that wraps it up tight for Rails 3. For instance:
Rails 3.1 Dependent / Cascading Dropdowns and
Rails 3.1 interdependent select dropdown lists
... seem to offer only partial solutions. I am getting the feeling that I might be missing some fundamental Rails concept and that this (seemingly common) task should be easier. I want to streamline the user input experience. My models have a lot of good default data that I'd like to present to the user as they make their input choices. I just can't seem to get it all on one page.
I don't get the search results I am seeking when I look for "Rails dynamic form input" Searching for "Rails Cascading dropdown" has helped some. "Rails active form" gets me a piece of internet history.
Can someone guide the way?
Thanks!
ADDENDUM
This seems to allude to the trouble I have stumbled upon: http://guides.rubyonrails.org/form_helpers.html#building-complex-forms Perhaps that's my answer?
JQuery is the way to go here I think. Now I am no expert in matters pertaining to JQuery, but I hope I can at least point you in the right direction. To accomplish your cascading list, you could show and hide the select inputs based on the change of the previous one. From there I would look into a JQuery library called jquery-chained. This library would allow you to show in the states select only those states which pertain to the selected country. I do have a couple working examples of the chained library that I could show an example of if you would like, and I am sure there are many examples out there of hiding and showing form elements in JQuery.

Resources