Pre-Fill a Text Field with a Query String Value

1. Add a Content Editor Web Part to the page.
2. Edit the web part and add the following script in the 'Source Editor'.
 

 
 
 
 
 
 
 
 
 
 
 
Note:
The above example assumes that you pass a Query String parameter called 'InvoiceAmount' and you have a Text field in the form with the display name 'Invoice Amount'.
 
Thanks to the original author of the script.

No comments: