How can i inject huge JS into SmartForm? Datalabel length limitation is ridiculous.
Good Day Vcz
Making use of a transfer data rule will allow you to add more text to the data label while set as literal. Please see the below steps on how to make use of this.
Steps:
1) Create a view.
2) Add a data label to the views canvas and ensure the the Literal property is ticked in the control property section.
*Normally for quick configuration the desired JavaScript would have been added to the "Text" property of the data label control, this would then allow the control to fire the code on runtime. This has character limit.
For this specific scenario the requirement is to add a huge piece of JavaScript to the data label which means the control text property will not suffice.
3) Instead of using the data label text property you can navigate to the rules tab and add a rule on which the code should be firing on for example: when view executes initialize.
4) After the rule has been added drill into it and add a Transfer Data rule.
5) In the Transfer Data rule you can then add your code to the data label section.
6) Save, Finish and Run the view. The code should fire as expected.
Kind Regards
Raymond
Thanks!
I just found out that my huge JS embedded in expression of datalabel was not working due to an error in the script itself. So i would recommend using expressions also.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.