Passing Data into Form by URL

Body

You can pass values into the form from the URL by appending the end of the URL with the '_data=' parameter.

ie:  &_data=(EMail:'test@gmail.com',Name:'Joe',Desc:'Please send details',Q:'20')

In this example we want the form to initialize with data from fields found in a different form.  Form A will be where we want to copy the data from and Form B will be where we want to copy the data too.  Using the raw form URL that is used to share the form of Form B, we will be appending the end of the URL with data from the name and email fields of Form A. 

 

//Use a trigger
if (Trigger.clicked) {
 
//this is the forms's raw form link that is used to share the form.
 var baseURL = "https://forms.fau.edu:443/frevvo/web/tn/fau/user/app/_qVaS4L_3EeeRlY2oYa3PfA/formtype/
 _kshzNL5UEeeRlY2oYa3PfA?_method=post&embed=true";

  var newURL;
  var msg = "";
  
  //"Name" & "Email" are the names of the fields that we want to populate in Form B 
  //"Student_Name" & "EMail_Ctl" are the names of fields we are using from Form A

  newURL = baseURL + "&_data=Name:" + Student_Name.value + "," + "Email:" + EMail_Ctl.value; 
  
  //Creates a hyperlink using the URL with updated data to the words "Click Here"
  msg = "<a href=\"" + newURL + "\">Click Here" + "</a><br />";

  //outputs the hyperlinked word to a message box
  Link.value = msg;
}

Details

Details

Article ID: 50650
Created
Tue 3/20/18 5:16 PM
Modified
Mon 4/16/18 5:06 PM