window.ftSetValueByID(fieldID, value);
This JS function will allow you to set the value in a specific field based on its ID.
Examples:window.ftSetValueByID('fld5', 1);
This will set the value of 1 into a field with the id of fld5
window.ftSetValueByID('fld5', 'hello');
This will set the value of hello into a field with the id of fld5
Watch the video