Hi Gregory,
Thanks for contacting Syncfusion support.
We have checked your query. We have maintained the strippedValue (i.e with out mask) in the maskedit element and hidden input. So, in form post back it will return the value with out masks only. To achieve your requirement you can maintain the new hidden input and update the value in that with mask by using the method get_UnstrippedValue(). Please refer the below code block.
<ej-mask-edit ej-for="@Model.inputmode" id="maskedPlate" mask-format=">AAA-AAAA" input-mode="@Syncfusion.JavaScript.InputMode.Text" create="oncreate" change="onchange"/>
[script]
function oncreate(args) {
var hidden = "<input type = 'hidden' id='custom" + this.element.attr('id') + "' name='" + this.element.attr('id') + "_hidden1' />"
this.wrapper.append(hidden)
}
function onchange(args) {
$('#custom'+ this.element.attr('id')).val(this.get_UnstrippedValue());
}
[controller]
public IActionResult Index(FormCollection collection)
{
string name = Request.Form["maskedPlate_hidden1"];
return View();
} |
For your convenience, we have attached the sample below,
Please let us know if you need further assistance in this.
Regards,
Karthik R