Note: This is for the Nintex forms for Office 365
There are times when you want to pass a value to a form via the URL. In my case, I was wanting to relate two lists together via the list item ID. This will require a little javascript and modify some settings of the form. Once you get the variable you can use it to set the value of a field in the list. This example sets a value for a field that does not show up on the form. The steps to accomplish this are shown below.
Step 1
Go to the Form Settings by clicking on Settings as shown below.

Step 2
Open up the Custom JavaScript section and put JavaScript in the box to get the field from the URL and insert it into the field. An example is show below. The URL value is ba (i.e. ?ba=333) and the list field is DevID.
The JavaScript for copying purposes.
var getQueryString = function ( field, url ) {
var href = url ? url : window.location.href;
var reg = new RegExp(‘[?&]’ + field + ‘=([^&#]*)’, ‘i’ );
var string = reg.exec(href);
return string ? string[1] : null;
};
var ba= getQueryString(‘ba’);
NWF$(document).ready(function() {
if(ba!=null)
{
NWF$(‘#’+DevID).val(ba);
}
});
Notes:
-NWF$ is a Nintex specific item that refers to the form
-You set the value of the field by placing the # sign in front of the