Custom control onBeforeSubmit callback
I've written a custom control using js library Inputmask.
Something like this:
<input name="<pega:reference name="$this-name"/>"/>
<script type="text/javascript">
$(function() {
var $selector = $('body input[name="<pega:reference name="$this-name" />"]');
var options = {
//some options for inputMask initialize
};
$selector.inputmask(options);
});
</script>
So, onBlur or onComplete(custom inputmask event) i can unmask and post the value of the field, that is bounded to a property, to the clipboard, using JS API method pega.api.ui.actions.postValue(eventObject, updateDOM). Because I have access to these events.
My question is:
How can i listen form submit event(for example doFormSubmit method) to unmask value before the form submit ?
In other words, how can I call removeMask method on before the form submit?
***Updated by moderator: Lochan to add Categories***