• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 619
  • Last Modified:

automatically fill out form

I have a warranty site I go to and I have select a drop down for country and put in a part number and serial number whenever I want to lookup the warranty.  Is there a way that I can automatically fill in these when I go to the site.  I have the data in a database on my own php driven website, so I can put links for each one that point to this warratny page.  They do not use variables in the url, but I'm sure there is some script that is able to do this.  
  • 2
1 Solution
This would largely depend on the script that generates the form on the remote end. If the form allows for error checking, perhaps the script is looking for some preset values to insert into the fields when an initial submit fails. If so, you can use this to your advantage.

For example, if the form has fields named 'country', 'partNumber', and 'serialNumber', you can create your own page like this:

<form action="<location of remote script>" method="post">
<input type="text" name="country" value="<yourCountry>" /><br />
<input type="text" name="partNumber" value="<yourPartNumber>" /><br />
<input type="text" name="serialNumber" value="<yourSerialNumber>" /><br />
<input type="submit" value="Submit" />

You will need to examine the remote form to determine where it posts (the value of 'action=' in the form), and use an identical location in your script (you may need to prefix the name of the remote site if it does not appear in the remote form).

This method may or may not work, depending on how the remote script is set up. If it does not, you can create a GreaseMonkey add-on (https://addons.mozilla.org/en-US/firefox/addon/748) to automatically fill out the form for you, or utilize one of the many automatical-form-fillers available on the web.
thur6165Author Commented:
OMG,  that actually worked.

Great! Glad to hear it. Now on your end you can just setup a way to automatically fill out your form, and submit as needed.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now