Can a K2 Form or a data label read a parameter that come from browser console?
Page 1 / 1
Hi squaladesign,
Are you trying to add javascript on Smartforms? The following posts might help.
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
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.