workflow: form: input text : how to remove accents ?

Hello,

  • I use workflow nuxeo on nuxeo 5.6.
  • I have a field “firstname” that user fill on a node form.

I want to disable/transform “accents” when user fill this field.

I through I could use js script or a run script with the good code if this solution is not yet proposed by nuxeo workflow-node-form-inputText, but, I don't know where I have to call it in nuxeo studio interface.

My run script:

WorkflowVariables["Name"]=WorkflowVariables["Name"].toUpperCase();
WorkflowVariables["firstName"]=org.apache.commons.lang.StringUtils.upperCase(WorkflowVariables["firstName"]) ;

But I still got accent, it's just in uppercase… Do you have a “run script” solution to remove accents on an input field with nuxeo studio ?

thank you

1 votes

1 answers

1793 views

ANSWER



Hello me,

I got your run script:

WorkflowVariables["name"]=org.nuxeo.common.utils.StringUtils.toAscii(WorkflowVariables["name"]);
2 votes