get selctbox options text and set it for checkbox label and append checked label to textbox











up vote
0
down vote

favorite












I have selectbox, Checkbox and TextBox fields, SelectBox field gets its option values from DB, so I don't know how many options will get. I need to append the same no of selectBox options text without first option to be label's text of checkbox field, then when user check some of this checkbox options append what user has checked only in textbox Separated by dash "-"






<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" >












share|improve this question






















  • I'm having difficulty understanding your question. I wonder if you can try rephrasing it in a more step by step manner. Also, you specify that you are creating options based on DB values, but you do not specify what server side language (PHP? Ruby? Node?) you are using to get that info and turn it into html. Knowing that will probably be necessary for any of us to answer your question.
    – Rowland Rose
    Nov 10 at 17:37










  • sorry that the question is unclear because english is not my mother tongue, I will try to explain it step by step: 1- 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 check and concatenate in text box Separated by dash "-". 5- I use web application connected to sql No coding for me to bring data from sql.
    – M.Gooda
    Nov 10 at 18:12















up vote
0
down vote

favorite












I have selectbox, Checkbox and TextBox fields, SelectBox field gets its option values from DB, so I don't know how many options will get. I need to append the same no of selectBox options text without first option to be label's text of checkbox field, then when user check some of this checkbox options append what user has checked only in textbox Separated by dash "-"






<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" >












share|improve this question






















  • I'm having difficulty understanding your question. I wonder if you can try rephrasing it in a more step by step manner. Also, you specify that you are creating options based on DB values, but you do not specify what server side language (PHP? Ruby? Node?) you are using to get that info and turn it into html. Knowing that will probably be necessary for any of us to answer your question.
    – Rowland Rose
    Nov 10 at 17:37










  • sorry that the question is unclear because english is not my mother tongue, I will try to explain it step by step: 1- 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 check and concatenate in text box Separated by dash "-". 5- I use web application connected to sql No coding for me to bring data from sql.
    – M.Gooda
    Nov 10 at 18:12













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have selectbox, Checkbox and TextBox fields, SelectBox field gets its option values from DB, so I don't know how many options will get. I need to append the same no of selectBox options text without first option to be label's text of checkbox field, then when user check some of this checkbox options append what user has checked only in textbox Separated by dash "-"






<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" >












share|improve this question













I have selectbox, Checkbox and TextBox fields, SelectBox field gets its option values from DB, so I don't know how many options will get. I need to append the same no of selectBox options text without first option to be label's text of checkbox field, then when user check some of this checkbox options append what user has checked only in textbox Separated by dash "-"






<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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 17:30









M.Gooda

5117




5117












  • I'm having difficulty understanding your question. I wonder if you can try rephrasing it in a more step by step manner. Also, you specify that you are creating options based on DB values, but you do not specify what server side language (PHP? Ruby? Node?) you are using to get that info and turn it into html. Knowing that will probably be necessary for any of us to answer your question.
    – Rowland Rose
    Nov 10 at 17:37










  • sorry that the question is unclear because english is not my mother tongue, I will try to explain it step by step: 1- 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 check and concatenate in text box Separated by dash "-". 5- I use web application connected to sql No coding for me to bring data from sql.
    – M.Gooda
    Nov 10 at 18:12


















  • I'm having difficulty understanding your question. I wonder if you can try rephrasing it in a more step by step manner. Also, you specify that you are creating options based on DB values, but you do not specify what server side language (PHP? Ruby? Node?) you are using to get that info and turn it into html. Knowing that will probably be necessary for any of us to answer your question.
    – Rowland Rose
    Nov 10 at 17:37










  • sorry that the question is unclear because english is not my mother tongue, I will try to explain it step by step: 1- 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 check and concatenate in text box Separated by dash "-". 5- I use web application connected to sql No coding for me to bring data from sql.
    – M.Gooda
    Nov 10 at 18:12
















I'm having difficulty understanding your question. I wonder if you can try rephrasing it in a more step by step manner. Also, you specify that you are creating options based on DB values, but you do not specify what server side language (PHP? Ruby? Node?) you are using to get that info and turn it into html. Knowing that will probably be necessary for any of us to answer your question.
– Rowland Rose
Nov 10 at 17:37




I'm having difficulty understanding your question. I wonder if you can try rephrasing it in a more step by step manner. Also, you specify that you are creating options based on DB values, but you do not specify what server side language (PHP? Ruby? Node?) you are using to get that info and turn it into html. Knowing that will probably be necessary for any of us to answer your question.
– Rowland Rose
Nov 10 at 17:37












sorry that the question is unclear because english is not my mother tongue, I will try to explain it step by step: 1- 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 check and concatenate in text box Separated by dash "-". 5- I use web application connected to sql No coding for me to bring data from sql.
– M.Gooda
Nov 10 at 18:12




sorry that the question is unclear because english is not my mother tongue, I will try to explain it step by step: 1- 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 check and concatenate in text box Separated by dash "-". 5- I use web application connected to sql No coding for me to bring data from sql.
– M.Gooda
Nov 10 at 18:12

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241593%2fget-selctbox-options-text-and-set-it-for-checkbox-label-and-append-checked-label%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241593%2fget-selctbox-options-text-and-set-it-for-checkbox-label-and-append-checked-label%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

List item for chat from Array inside array React Native

Thiostrepton

Caerphilly