Page 1 of 1

Need help in replacing icon through JS.

Posted: Wed Jun 07, 2017 11:18 am
by eventoteam
Hi,

I'm using Process maker v1.2 and i'm having issue in replacing a character with a Text, while submitting the form using JavaScript.
When a User paste its Phone number including the icon (📱) in the textarea. The form give derivation error on submission and later we can't access that case.

Field Code:
<textarea id="form[txtNoteToBeAdded]" name="form[txtNoteToBeAdded]" cols="100" rows="10" style="" class="module_app_input___gray" wrap="soft"></textarea>

Re: Need help in replacing icon through JS.

Posted: Wed Jun 07, 2017 9:57 pm
by amosbatto
Try adding this to your XML code:
Code: Select all
<mycode type="javascript" meta=""><![CDATA[getField("txtNoteToBeAdded").onchange = function() {
  var val = this.value.replace(/&#x?\d+;/g, "");
  val = val.replace("0x1f4f1", "");
  val = val.replace("\uf09f\u93b1", "");
  getField("txtNoteToBeAdded").value = val;
}]]></mycode>
See: http://www.fileformat.info/info/unicode ... /index.htm

Re: Need help in replacing icon through JS.

Posted: Tue Jul 25, 2017 8:54 am
by eventoteam
Sadly this didnt solve the problem, Still getting the error.
Kindly let me know any other way to resolve the issue.

Re: Need help in replacing icon through JS.

Posted: Thu Aug 03, 2017 2:12 am
by eventoteam
@amosbatto : Please Can you guide me how to resolve this issue, I'm facing.