Articles on: Technical

Creating Form Data for Post Data or QueryString

There is a very specific form data format that all QueryString and Post Data must be in to meet HTTP protocol standards. Here is an example of the format and an explanation of the requirements:

Example Form Data Format: ProdID=053974&CustName=John Doe&CustLocal=Atlanta, GA 14902&CustType=2

The example above demonstrates the Form Data format. The format consists of name-value pairs joined together by Ampersand signs (with no spaces in-between). The first name-value pair is "ProdID=053974"; the second name-value pair is "CustName=John Doe"; and so on.

Let's now consider how this form data format should be generated from a web page submission form. The first part of the name-value pairs is obviously the name. These names are not random but must match up to the "name" properties of the HTML form elements on your page. The following example demonstrates what the HTML form elements may look like for the corresponding Form Data example above. Note that the “name” properties match up to the name portion of the name-value pairs in the example above. Also note that we included the Hidden field named "ProdID" in the Post Data example above. This is very important.

The second part of the name-value pair is the Value. The Value corresponds to what you would expect a normal user to type into the web page form. For the sake of testing, you should specify values that would be fairly typical of user submissions. At times, you may want to test a couple of different user submission scenarios for a particular submission form. To do this, you will need to add additional Test Scenarios to your Monitor for the same submission form but specify a different set of name-value pairs.

Note: that if you need to use an Ampersand, Equals sign or other special character as part of the Value, you will need to replace them with the ASCII equivalents, so that they do not interfere with the Form Data format. Please see the Related Article below for all the special characters that must be substituted and their ASCII equivalents.

Related Links
Post Data & QueryString Special Char. Substitution

Updated on: 10/24/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!