AnsweredAssumed Answered

setting fields value using jquery

Question asked by csrameneni on Nov 23, 2015
Latest reply on Dec 2, 2015 by csrameneni

Hi Friends,

 

Using some jQuery code in the Form Settings, I'm trying to set a field's value. For some reason, I'm unable to assign the value

 

Step 1: Created a text column test and used the Client ID javascript variable name as PMValue

Step 2: In form settings, I used this code to extract the string value and assign it to list column

 

NWF$(document).ready(function() {

 

var string = 'Follow Up=10;Meeting=90;Research=20;Transferred=83;';

var auxArray = string.split(';');

var keyValues = [];

 

$.each(auxArray, function(idx, elemString){

   var elem = elemString.split('=');

   keyValues.push({elem});

});

 

NWF$('#'+PMValue).val(keyValues['Follow Up']);

});

 

Can someone please look into this and let me know the modifications I need to make in this code? Thank you

Outcomes