This is a migrated thread and some comments may be shown as answers.
MaskedTextBox.UnmaskOnPost() does not work on Form Widget
3 Answers 14 Views
This is a migrated thread and some comments may be shown as answers.
Bas
Top achievements
Rank 1
Bas asked on 11 Jul 2020, 09:12 PM

When I add an editor to a form either directly or through the new wizard, it does not unmask the field. Please let me know what am I doing wrong.

...
    item.Add()
        .Field(field => field.Zip)
        .Label(label => label.Text("Zip"))
        .Editor(editor => editor.MaskedTextBox().Mask("00000-9999").UnmaskOnPost());
...

3 Answers, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 15 Jul 2020, 11:28 AM

Hello Bas,

Thank you for reaching out. I tried reproducing the reported behavior but to no avail. 

I have created a sample project, based on the provided details, and the input from the MaskedTextBox is unmasked on form submission. Can you please review the sample and update it so the issue is reproducible and send it back to me for further investigation?

Looking forward to hearing back from you.

Regards,
Aleksandar
Progress Telerik

0
Bas
Top achievements
Rank 1
answered on 19 Jul 2020, 03:34 PM

Thanks Aleksandar, your code works fine and my setup (jquery and kendo includes) is exactly the same, but mine doesn't work. I'm trying to investigate why mine doesn't work. I've been shooting blanks in terms of what event I should break to see the unmasking. It's possible something in my code is preventing the event from firing or it's suppressed. Any pointers will be helpful. Thanks again.

Bas

0
Aleksandar
Telerik team
answered on 22 Jul 2020, 02:08 PM

Hi Bas,

The MaskedTextBox does not provide a suitable event, but you can handle the submit event of the From and check the form model values that would be submitted and whether the input has been unmasked.

If you can manage to isolate the behavior please send a sample project, so I can review it further. Without being able to observe and reproduce the issue I am afraid I cannot be of better help.

Regards,
Aleksandar
Progress Telerik

Tags
Form
Asked by
Bas
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Bas
Top achievements
Rank 1
Share this question
or