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

Credit Card string

Thread ID:

Created:

Updated:

Platform:

Replies:

146370 Aug 1,2019 06:10 PM UTC Aug 2,2019 12:49 PM UTC Xamarin.Forms 1
loading
Tags: SfDataForm
Mario
Asked On August 1, 2019 06:10 PM UTC

Hello,

How can I mask a credit card number input in a dataform. 

Subburaj Pandian Veluchamy [Syncfusion]
Replied On August 2, 2019 12:49 PM UTC

Hi Mario,                     
 
Thank you for contacting Syncfusion support. 
 
Based on provided information, your requirement of “Mask the Credit card number using DataForm” can be achieved by using MaskedEditText editor in DataForm. 
 
Please find the code snippet for the same, 
 
[C#] 
 
dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem; 
  
        private void DataForm_AutoGeneratingDataFormItem(object sender, AutoGeneratingDataFormItemEventArgs e) 
        { 
            if (e.DataFormItem.Name.Equals("CardNumber")) 
            { 
                var maskedItem = e.DataFormItem asDataFormMaskedEditTextItem; 
                maskedItem.Mask = "0000-0000-0000-0000"; 
                maskedItem.PromptChar = 'X'; 
                maskedItem.KeyBoard = Keyboard.Numeric; 
            } 
        } 
  
We have prepared the simple sample for the same. Kindly, check the sample from following link. 
 
 
Please refer our User Guide documentation for more details, 
 
 
We hope that this helps you. Kindly, revert us if you have any concern. 
 
Regards,
Subburaj Pandian V  
 


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