Skip to main content
Nintex Community Menu Bar

Can a K2 Form or a data label read a parameter that come from browser console?

Hi squaladesign,



 



Are you trying to add javascript on Smartforms? The following posts might help.



https://community.nintex.com/t5/K2-Five-Forum/Using-external-JavaScript-Libraries-in-SmartForms/m-p/155427#M879



 



https://community.nintex.com/t5/K2-Five-Forum/Trigger-SmartForms-Rule-Using-JavaScript-or-Set-Data-Field/m-p/196373#M8657



 


No not really, I know how to add JavaScript, I was asking if I can read, with JavaScript or something else, the browser console and pickup a parameter that I need.


I don't think it's possible to access the console using code, but the data you want should be found in an element or variable on the page, so you will have to find the name of that element.

Then you can get this data into K2 by putting a script like this in your datalabel:



<script type="text/javascript"> $("[name='YourDataLabelName']").SFCLabel('option', 'text', 'YourElement.value'); </script>

Reply