set selectbox options as a checkbox choices
up vote
-2
down vote
favorite
I have select box in my form, I dont know how many values this select box will filled out because it get it's values from DB.
2-After this selectbox filled out, I need to take all it's values and set it as checkbox choices.
3- User will chose some of this checkbox choices or check all of them.
4- need to take that choices what user will check and concatenate in text box Separated by dash "-" and if user not check any of them keep textbox empty.
<select id= "selectbox">
<option value="option1">Choice1</option>
<option value="option2">Choice2</option>
<option value="option3">Choice3</option>
</select>
<input type="checkbox" id="chckbox">
<label for="Field3-0">Checkbox1</label>
<input type="checkbox" id="chckbox">
<label for="Field3-1">Checkbox2</label>
<input id= "textfield" type= "text" >
javascript jquery
add a comment |
up vote
-2
down vote
favorite
I have select box in my form, I dont know how many values this select box will filled out because it get it's values from DB.
2-After this selectbox filled out, I need to take all it's values and set it as checkbox choices.
3- User will chose some of this checkbox choices or check all of them.
4- need to take that choices what user will check and concatenate in text box Separated by dash "-" and if user not check any of them keep textbox empty.
<select id= "selectbox">
<option value="option1">Choice1</option>
<option value="option2">Choice2</option>
<option value="option3">Choice3</option>
</select>
<input type="checkbox" id="chckbox">
<label for="Field3-0">Checkbox1</label>
<input type="checkbox" id="chckbox">
<label for="Field3-1">Checkbox2</label>
<input id= "textfield" type= "text" >
javascript jquery
1
You haven't really asked any questions here. All you've done is stated your requirements. We expect that you will do your research ahead of time and make an attempt at a solution. Then, if you have a specific question about your attempt. Post that here.
– Scott Marcus
Nov 10 at 19:33
And please don't duplicate questions. You already asked the same question here stackoverflow.com/questions/53241593/…
– charlietfl
Nov 10 at 19:44
sorry for that, I tried to ask question step by step to be clear. I already try to search for solution for that requirements , First i get values for selectbox then try to set for checkbox but it not working $(document).ready(function() var options = $('#selectbox option').text(); $("#checkbox").text(options); );
– M.Gooda
Nov 10 at 19:58
Check How to add value of checked checkbox to textarea using jquery?
– Mohammad
Nov 10 at 20:23
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
I have select box in my form, I dont know how many values this select box will filled out because it get it's values from DB.
2-After this selectbox filled out, I need to take all it's values and set it as checkbox choices.
3- User will chose some of this checkbox choices or check all of them.
4- need to take that choices what user will check and concatenate in text box Separated by dash "-" and if user not check any of them keep textbox empty.
<select id= "selectbox">
<option value="option1">Choice1</option>
<option value="option2">Choice2</option>
<option value="option3">Choice3</option>
</select>
<input type="checkbox" id="chckbox">
<label for="Field3-0">Checkbox1</label>
<input type="checkbox" id="chckbox">
<label for="Field3-1">Checkbox2</label>
<input id= "textfield" type= "text" >
javascript jquery
I have select box in my form, I dont know how many values this select box will filled out because it get it's values from DB.
2-After this selectbox filled out, I need to take all it's values and set it as checkbox choices.
3- User will chose some of this checkbox choices or check all of them.
4- need to take that choices what user will check and concatenate in text box Separated by dash "-" and if user not check any of them keep textbox empty.
<select id= "selectbox">
<option value="option1">Choice1</option>
<option value="option2">Choice2</option>
<option value="option3">Choice3</option>
</select>
<input type="checkbox" id="chckbox">
<label for="Field3-0">Checkbox1</label>
<input type="checkbox" id="chckbox">
<label for="Field3-1">Checkbox2</label>
<input id= "textfield" type= "text" >
<select id= "selectbox">
<option value="option1">Choice1</option>
<option value="option2">Choice2</option>
<option value="option3">Choice3</option>
</select>
<input type="checkbox" id="chckbox">
<label for="Field3-0">Checkbox1</label>
<input type="checkbox" id="chckbox">
<label for="Field3-1">Checkbox2</label>
<input id= "textfield" type= "text" >
<select id= "selectbox">
<option value="option1">Choice1</option>
<option value="option2">Choice2</option>
<option value="option3">Choice3</option>
</select>
<input type="checkbox" id="chckbox">
<label for="Field3-0">Checkbox1</label>
<input type="checkbox" id="chckbox">
<label for="Field3-1">Checkbox2</label>
<input id= "textfield" type= "text" >
javascript jquery
javascript jquery
asked Nov 10 at 19:23
M.Gooda
5117
5117
1
You haven't really asked any questions here. All you've done is stated your requirements. We expect that you will do your research ahead of time and make an attempt at a solution. Then, if you have a specific question about your attempt. Post that here.
– Scott Marcus
Nov 10 at 19:33
And please don't duplicate questions. You already asked the same question here stackoverflow.com/questions/53241593/…
– charlietfl
Nov 10 at 19:44
sorry for that, I tried to ask question step by step to be clear. I already try to search for solution for that requirements , First i get values for selectbox then try to set for checkbox but it not working $(document).ready(function() var options = $('#selectbox option').text(); $("#checkbox").text(options); );
– M.Gooda
Nov 10 at 19:58
Check How to add value of checked checkbox to textarea using jquery?
– Mohammad
Nov 10 at 20:23
add a comment |
1
You haven't really asked any questions here. All you've done is stated your requirements. We expect that you will do your research ahead of time and make an attempt at a solution. Then, if you have a specific question about your attempt. Post that here.
– Scott Marcus
Nov 10 at 19:33
And please don't duplicate questions. You already asked the same question here stackoverflow.com/questions/53241593/…
– charlietfl
Nov 10 at 19:44
sorry for that, I tried to ask question step by step to be clear. I already try to search for solution for that requirements , First i get values for selectbox then try to set for checkbox but it not working $(document).ready(function() var options = $('#selectbox option').text(); $("#checkbox").text(options); );
– M.Gooda
Nov 10 at 19:58
Check How to add value of checked checkbox to textarea using jquery?
– Mohammad
Nov 10 at 20:23
1
1
You haven't really asked any questions here. All you've done is stated your requirements. We expect that you will do your research ahead of time and make an attempt at a solution. Then, if you have a specific question about your attempt. Post that here.
– Scott Marcus
Nov 10 at 19:33
You haven't really asked any questions here. All you've done is stated your requirements. We expect that you will do your research ahead of time and make an attempt at a solution. Then, if you have a specific question about your attempt. Post that here.
– Scott Marcus
Nov 10 at 19:33
And please don't duplicate questions. You already asked the same question here stackoverflow.com/questions/53241593/…
– charlietfl
Nov 10 at 19:44
And please don't duplicate questions. You already asked the same question here stackoverflow.com/questions/53241593/…
– charlietfl
Nov 10 at 19:44
sorry for that, I tried to ask question step by step to be clear. I already try to search for solution for that requirements , First i get values for selectbox then try to set for checkbox but it not working $(document).ready(function() var options = $('#selectbox option').text(); $("#checkbox").text(options); );
– M.Gooda
Nov 10 at 19:58
sorry for that, I tried to ask question step by step to be clear. I already try to search for solution for that requirements , First i get values for selectbox then try to set for checkbox but it not working $(document).ready(function() var options = $('#selectbox option').text(); $("#checkbox").text(options); );
– M.Gooda
Nov 10 at 19:58
Check How to add value of checked checkbox to textarea using jquery?
– Mohammad
Nov 10 at 20:23
Check How to add value of checked checkbox to textarea using jquery?
– Mohammad
Nov 10 at 20:23
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242606%2fset-selectbox-options-as-a-checkbox-choices%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
You haven't really asked any questions here. All you've done is stated your requirements. We expect that you will do your research ahead of time and make an attempt at a solution. Then, if you have a specific question about your attempt. Post that here.
– Scott Marcus
Nov 10 at 19:33
And please don't duplicate questions. You already asked the same question here stackoverflow.com/questions/53241593/…
– charlietfl
Nov 10 at 19:44
sorry for that, I tried to ask question step by step to be clear. I already try to search for solution for that requirements , First i get values for selectbox then try to set for checkbox but it not working $(document).ready(function() var options = $('#selectbox option').text(); $("#checkbox").text(options); );
– M.Gooda
Nov 10 at 19:58
Check How to add value of checked checkbox to textarea using jquery?
– Mohammad
Nov 10 at 20:23