2011-03-29
 
Kategorie
 

Automatic Entry Submission

 

As I wrote previously, you can pass parameters in a URL to pre-fill fields. Today, we take one step further—by passing a URL parameter, you can automatically submit an entry!

The parameter is called autoSend. By entering https://activeforms.com/client/form?autoSend=true we’ll attempt to submit an entry automatically. The attempt will succeed, if we are not stopped by a validation. Passing the autoSend parameter will simulate a regular user entering the form and clicking the ‘Submit’ button.

If validation errors are detected, a user will be stopped at the first page of the form where such errors have been found, and he or she will see the corresponding validation error messages. If the ActiveForms engine doesn’t find any validation errors, a user will get what he or she would see having completed the entry manually: either a thank you screen, or a redirect to an external page.

Obviously, sending the autoSend parameter alone will achieve nothing if the form includes required fields and they remain empty. However, in addition to autoSend, you can still pass other required data in the URL. Using the https://activeforms.com/client/form?first_name=Sherlock&last_name=Holmes&autoSend=true link will fill the first_name and last_name fields and trigger an attempt to submit the entry.

How can this be put to use? Mainly to maintain all your entries in one place—in ActiveForms. If you use ActiveForms to collect leads from many marketing campaigns, the mechanism allows you to populate the ActiveForm database with data from not just forms, but other sources as well. When you have a glamorous landing page with a mini-form done in Flash, you can still redirect the user to an ActiveForms form and use the autoSend parameter to supply the data to ActiveForms.
Micro-forms can sometimes be implemented as links: users don’t fill in HTML fields, but rather select options by clicking in wizard mode. Eventually, a user can be redirected to an address like https://activeforms.com/client/form?field1=answer1&field2=answer2&autoSend=true, which ensures the consistency of all data collected from all forms.

Note that automatic entry submissions require that the form be called in a web browser. Entering a page at such an address triggers the regular calculation of dependencies between fields in JavaScript. Calling such an address with a server tool like w-get won’t produce the desired effect.

 
 
recent posts
3rd Apr 2014
Faster than ever!
5th Dec 2013
Live validation!
2nd Dec 2013
Features distilled
12th Mar 2012
Flicking Channels
26th Jan 2012
Your Own Error Page
9th May 2011
Box Properties
15th Apr 2011
Grouping Fields
13th Apr 2011
Form Versioning
24th Feb 2011
Form Access Modes
22nd Feb 2011
Required Fields
4th Feb 2011
Stats!