Hitting Enter key is submitting the request in service portal

madanm7786
Mega Guru

Hi All,

We have single line text variable in lot of catalog items. While raising such requests in portal, when you add text in single line text variable and hit enter in service portal, the request is submitted.

We need to avoid this.

I checked the  "enter_submits_form" user preference and it is already False. I even tried by commenting below line in Ticket Conversations widget.

<textarea ng-keypress="keyPress($event)" sn-resize-height="trim" rows="1" id="post-input" class="form-control no-resize" ng-model='data.journalEntry' placeholder="{{placeholder}}" autocomplete="off" ng-change="userTyping(data.journalEntry)" />

But still when you hit the Enter request is submitting.

Can you please help me on this.

Thanks,

Maddy

4 REPLIES 4

Nguyen Quang Tu
Mega Guru

Please read this article. It will solve your problem i think.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0712495

I tried it and it worked perfectly.

find_real_file.png

Olga_G
Tera Contributor

Instead of cloning the widget, I fixed it with the system property that has to be changed to 'true'. From documentation:

Enter key behaviorThe action to perform when pressing the Enter key. The default is to submit the entry. The System Property option is based on the value of the glide.service_portal.comment.enter_adds_newline system property.

sattar3
Tera Contributor

Hi @Olga_G , I also tried the same way you did.

I also changed the system property "glide.service_portal.comment.enter_adds_newline" to true. Its working now.

sattar3_0-1715829500530.pngsattar3_1-1715829521323.png

 

Does this impact our system? any performance issues in future?

Do we need to enable the Ignore Cache field also?

Please answer to my questions.

 

 

Thanks,

Sattar