0

I am trying to show multiple selected option of a person from selected value. Here is an example but not working.

I want to do like this dynamically .

4
  • 1
    Please explain more. your question should be complete with no need to external references. Commented Jul 25, 2015 at 14:12
  • I want to show all already selected value/option in multiple <select tag. Commented Jul 25, 2015 at 14:13
  • Hold down control key when click each option. The selected options turn grey. Commented Jul 25, 2015 at 14:14
  • Now see my updated question. Commented Jul 25, 2015 at 14:22

4 Answers 4

2

Basicly you need a trigger("chosen:updated")

I'd updated your fiddle, you can find here http://jsfiddle.net/ebilgin/hdz8f1b6/2/. I hope it works for you.

Sign up to request clarification or add additional context in comments.

1 Comment

Is it possible to show values by sort order of selected? @ebilgin
0

Add this to css (for example):

.result-selected{color:white !important; background:blue !important;}

Comments

0
$('.value').val('demo 1,demo 2');

$('.chosen-select').val($('.value').val().split(',')) // set value, accepts array

$('.chosen-select').chosen();

$('.chosen-select').on('change', function() {

    values = $('.chosen-select').val();

$('.value').val(values);

}) ;

2 Comments

Is it possible to show values by sort order of selected? @vinayakj
needs to ask separate question please.. this one's been answered
0

HTML

1. General Events.

<input type="checkbox" name="GE[]" value="Brainometer>
<input type="checkbox" name="GE[]" value="Hot Seat">
<input type="checkbox" name="GE[]" value="Mind Drill> 
<input type="checkbox" name="GE[]" value="Techno Art>
<input type="checkbox" name="GE[]" value="Photography">

If U Want to get multiple selected option of a person from selected value Using PHP: use implode... multiple value can be store in $ge depends on what the user select...

PHP

if(isset($_POST['GE'])){
      $ge = implode(", ",$_POST['GE']);
}else{
      $ge = "";
}</p>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.