robinhodemorais Posted September 26, 2021 Share Posted September 26, 2021 Hello, I created the css below for certain validations in uniedit, so you need to leave it dynamic, that is, activate when for some condition. .campoVazio { border-color: red !important; box-shadow: 0 3px 4px rgb(255 0 0 / 16%), 0 3px 4px rgb(255 0 0 / 23%); } For this I'm trying to do the following way UniSession.AddJS('$(''#'+edCliente.JSId+''').addClass(''campoVazio'')'); When you call the command above, the field doesn't have the css, how can I do it? and taking advantage, to disappear when necessary manually, how could I do it? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 26, 2021 Share Posted September 26, 2021 4 hours ago, robinhodemorais said: UniSession.AddJS('$(''#'+edCliente.JSId+''').addClass(''campoVazio'')'); Hello, Just try using this: edCliente.JSInterface.JSCall('addCls', ['campoVazio']); Quote Link to comment Share on other sites More sharing options...
robinhodemorais Posted September 26, 2021 Author Share Posted September 26, 2021 it worked perfectly, thank you. How do I remove? I tried to pass the parameter [] empty with JSCall but it wasn't, this way below works, but when I click on the field it comes back, how can I remove it? UniSession.AddJS('$(''#'+edCliente.JSId+''').removeClass(''campoVazio'')'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 26, 2021 Share Posted September 26, 2021 8 hours ago, Sherzod said: edCliente.JSInterface.JSCall('addCls', ['campoVazio']); 'removeCls' Quote Link to comment Share on other sites More sharing options...
robinhodemorais Posted September 26, 2021 Author Share Posted September 26, 2021 Thanks, just one more question I'm racking my brain here; In css I put the border-color: #red !important; but the border isn't turning red, it's just with the shading of the css. Look through the browser inspector I noticed that I would have to change the css of x-form-trigger-wrap-default, but if I do that changes all fields, I would have to change only this specific one. the theme i'm using is the crisp. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 26, 2021 Share Posted September 26, 2021 23 minutes ago, robinhodemorais said: just one more question I'm racking my brain here; In css I put the border-color: #red !important; but the border isn't turning red, it's just with the shading of the css. Look through the browser inspector I noticed that I would have to change the css of x-form-trigger-wrap-default, but if I do that changes all fields, I would have to change only this specific one. the theme i'm using is the crisp. If I understand you correctly, also set the following css rules to your style: border-width: 1px; border-style: solid; border-color: red; Quote Link to comment Share on other sites More sharing options...
robinhodemorais Posted September 26, 2021 Author Share Posted September 26, 2021 Thank you very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.