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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

checkbox returns boolean instead of given value

Thread ID:

Created:

Updated:

Platform:

Replies:

149241 Nov 19,2019 11:41 PM UTC Nov 25,2019 10:03 AM UTC Angular - EJ 2 3
loading
Tags: CheckBox
Michael Hertlein
Asked On November 19, 2019 11:41 PM UTC

Hi,

I have several checkboxes in my reactive form. Each checkbox has a value argument. When I check the box, not the given value (here "testwert") goes to my form, but the boolean TRUE. When I uncheck the box, the value in my form is the boolean FALSE. Initially the form value is an empty string.
<ejs-checkbox formControlName="test" value="testwert" label="test"></ejs-checkbox>
Am I doing anything wrong here?

Thank you.

Michael


Sridhar Alagiri Samy [Syncfusion]
Replied On November 20, 2019 02:00 PM UTC

Hi Michael, 
  
Good day to you.
  
We have checked the reported issue in our checkbox. By default, the angular reactive form will return the Boolean type for checkboxes during form submit.
  
We have created a sample using angular reactive form for getting the selected checkbox values on form submit. Please refer the below sample link.
  
  
If we misunderstood your requirement, please share more details about this. So that we can work on this and provide you a better solution quickly. 
  
Regards, 
Sridhar A. 


Michael Hertlein
Replied On November 23, 2019 02:42 PM UTC

Thank you.
If this is the only way to get the "real" value, it would help if this would be documented.

Michael

Arunkumar Devendiran [Syncfusion]
Replied On November 25, 2019 10:03 AM UTC

Hi Michael, 
 
Thank you for your update. 
 
We have checked your reported suggestion regarding online documentation, we will consider this in our end and upgrade the online documentation site in any of our upcoming release. We will update you once refreshed in live. 
 
Regards, 
Arunkumar D 


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

Live Chat Icon For mobile
Live Chat Icon