Skip to main content
Nintex Community Menu Bar

Adding javascript/CSS to a control inside of a repeating section

  • January 10, 2019
  • 2 replies
  • 40 views

Forum|alt.badge.img+3

Hi all,

I'm looking for a solution that will capitalize all characters entered inside a Repeating section.

I've been using the following javascript and it applies to the first control in the Repeating section.

Code :

NWF$(document).ready(function(){
NWF$('#' + varControl).change(function(){
this.value = this.value.toUpperCase();
});
});

Code is from here: https://community.nintex.com/thread/17335-force-text-to-uppercase

I've had a chat to some people in the office who know javascript better than me and they're mentioning that it's due to the script being applied when page is loaded. Adding another row doesn't apply the script due to this, new row also has a new ID which is affecting it. But because they don't know nintex it may take some time before they could get it working themselves.

Does anyone have a solution? At this point I'm indifferent to using JavaScript or CSS as capitalization only needs to be applied to the form rather than a sharepoint list

2 replies

Forum|alt.badge.img+7
  • January 11, 2019

Try this:

NWF$(document).ready(function(){
     NWF$('.toUpper').change(function(){
          NWF$(this).val(NWF$(this).val().toUpperCase());
     });
});

Use a CSS class instead of the Client ID JavaScript Variable.


Forum|alt.badge.img+3
  • Author
  • January 11, 2019

Bang on, figured it might be a quick fix for someone that's done it before.

Thanks very much.