You need to sign in to do that
Don't have an account?

Implement multiple choice questions in a lightning form
Hi folks,
I am new to lightninf and i have a requirement.
I need to Implement multiple choice questions in a lightning form and bind the choosen values with a field in salesforce
suppose the field is "Question" (Api name question__c) and possible answers are op1,op2,op3,op4
Can you correct this part and tell me how can i bind tthe answers with the field ? I want to have multiple checkboxes
I am new to lightninf and i have a requirement.
I need to Implement multiple choice questions in a lightning form and bind the choosen values with a field in salesforce
suppose the field is "Question" (Api name question__c) and possible answers are op1,op2,op3,op4
Can you correct this part and tell me how can i bind tthe answers with the field ? I want to have multiple checkboxes
<h4>Question</h4> <div class="slds-grid slds-wrap"> <div class="slds-grid slds-wrap"> <div class="slds-col slds-size_1-of-2"> <lightning:input type="checkbox" label="Op1" name="type1" value="{!v.question__c"/> </div> <div class="slds-col slds-size_1-of-2"> <lightning:input type="checkbox" label="Op2" name="type2" value="{!v.question__c}"/> </div> <div class="slds-col slds-size_1-of-2"> <lightning:input type="checkbox" label="Op3" name="type3" value="{!v.question__c}"/> </div> <div class="slds-col slds-size_1-of-2"> <lightning:input type="checkbox" label="Op4" name="type4" value="{!v.question__c}"/> </div> </div> </div>