I have a textfield in Nintex Forms to which I assigned the following JavaScript variable name:
varAirplaneContent
This textfield has content inside which has a wrong format:
I wanted to use the NintexForm user defined JavaScript to edit the content of this field.
I tried using
var text = 'Reservation - Airplane Content'; var json = JSON.parse(text); var count = json.length;
var flightDataSplitted;
for (var i=0; i < count; i++){ flightDataSplitted = json[i].Title.split(","); console.log(flightDataSplitted); } function testFunction(){
console.log("testFunction called!"); NWF$('#'+varAirplaneContent).val(flightDataSplitted); } NWF$(document).ready(function(){ testFunction(); });
but it doesn't work:
The content in the field is still the same. What am I doing wrong?