PHP/Codeigniter processing a list with javascript -


I have a list of items that users can choose I want to be more user-friendly than standard checkboxes. So I have a separate ID with unique ID.

When an item clicks on an item, I use javascript to display a tick at the top of that object to show the style that it is highlighted.

I am trying to do this work as to how I can overcome the ID list when I submit the form. Remember, if a user invents an item, then it should be removed from the list, I was thinking of using a comma-separated values ​​in a secret text field, but working on the way to remove items from the beginning of the list If they were not selected,

You can store your list of selected items in a JavaScript array, Like Babakar Said, when you toggle your style, add or remove element in / from array also. Then when you submit the form, write a piece of JavaScript that plugs the array data into hidden fields.

In addition, if you are speaking directly in the case of user friendliness, then I have advised in years that people are actually used quite a checkbox and they are the highest for the user Level provide an understanding. It has been tried and true so long as you are not shooting a particular design shoot, I would like to be with the check box.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -