squaladesign
Forms Fledgling

Canvas that send a parameter

Hi everyone, I have a GIS map in a canvas and I like to pass a parameter from the GIS map to the SmartForm. I that possible?

Thanks

Labels: (1)
0 Kudos
Reply
2 Replies
dchersels
Nintex Employee
Nintex Employee

Re: Canvas that send a parameter

You can inject a javascript function (or use it inline in your javascript when the event fires). This works for me:
<script type=”text/javascript”>function writeToDataLabel(response) {$('span[name="Data Label Response"]').SFCLabel("option", "text", response);}</script>

 

Then you simply call writeToDataLabel("Use This Text"); in your javascript that responds to the actions on the map and writes the value to a data label called Data Label Response. You can of course make this more generic where it accepts the control name as an input as well if you have multiple controls you need to set.

 

If you're not familiar with using javascript in a SmartForm, the following external article will guide you through it:

Basic jQuery/Javascript samples in smart forms – Uncode K2 (wordpress.com)

0 Kudos
Reply
squaladesign
Forms Fledgling

Re: Canvas that send a parameter

I'm already using JS in the SmartForm, I will try your solution, thanks

0 Kudos
Reply