We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how can i bind multiple questions with multiple radio button for each question that i get it from array

Thread ID:

Created:

Updated:

Platform:

Replies:

143378 Mar 15,2019 12:25 PM UTC Mar 19,2019 05:26 AM UTC Angular - EJ 2 1
loading
Tags: RadioButton
thowfik
Asked On March 15, 2019 12:25 PM UTC

how can i show  multiple questions as labels with multiple radio button for each question that i get it from array and bind it to form 
for example 
1. favroite color with options as red, blue
2.favorite food with options as idly, dosa which i get it from array

i have attached screenshot of the same. thanks in advance

Regards
Thowbik


Attachment: screenshotlocalhost42002019.03.15172304.png_b929238c.zip

Deepa Loganathan [Syncfusion]
Replied On March 19, 2019 05:26 AM UTC

Hi Thowfik, 
 
 
Thank you for contacting Syncfusion support. 
 
 
We have checked your requirement “To bind multiple questions with multiple radio button for each question that i get it from array” and prepared sample. Please check the below code snippet. 
 
 
HTML 
<div class="control-section"> 
    <div *ngFor="let value of arrayValue"> 
        <h3>{{value.Qts}}</h3> 
        <ejs-radiobutton *ngFor="let key of value.options;" label={{key}} name={{value.name}}></ejs-radiobutton> 
    </div> 
</div> 
 
 
TS 
export class RadioButtonController { 
    public arrayValue = [{Qts: "Who is your fourite Actor:", name: "actor", options: ["Vijay", "Ajith"]},{Qts: "Which is your favorite Food:", name: "food", options: ["Fried Rice", "Curd Rice", "Sambar Rice"]}, {Qts: "Which is your favorite color:", name: "color", options: ["Red", "Blue", "Green", "Yellow"]}]; 
} 
 
 
 
 
Could you please check the above sample and get back to us if you need any further assistance on this? 
 
 
Regards, 
 
Deepa L. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;