ContactForm

Frequently Asked Questions

See also: Shared FAQ


How do I configure/customize ContactForm?
How do I change ContactForm's styling?
How do I use the /contact shortcut URL?
How do I embed ContactForm in another page, or within my site's existing layout?
I get an Internal Server Error!
I get an "undefined function virtual", "request execution failed", or "exec disabled" error.

  

How do I configure/customize ContactForm?

Edit your contact_prefs.cgi file in a text editor.  This file is normally in your server's cgi-bin directory, or it may be in your contact directory on Windows servers.  The prefs file contains many adjustable settings along with documentation for them.  For example, you may want to adjust $PREF{title} in PREFs Section 07.

You'll notice that many lines in the prefs file begin with a "#" character.  These lines are inactive "comment" lines containing instructions and examples, so don't change anything on them, because it won't have any effect on ContactForm.  If you see a pref that you want to adjust, but it's on an inactive line, that usually means it's just an example included as part of the documentation, so you should look for another instance of that same pref on a line that doesn't begin with a "#" character – that will be the active version of the pref, so that's the one you should adjust.

If you're feeling adventurous, you can also edit the app's code, in the contact.cgi file.  This isn't necessary in 99% of cases, but if you're a programmer and want to modify it, you can.  Just be sure to make a backup copy first.

[ TopCF HomepageInstructionsDownloadBuy ]

 

How do I change ContactForm's styling?

To customize the styling (look and feel), you can adjust $PREF{css}.  To include an external CSS file, use a CSS @import statement:

$PREF{css} = qq`

\@import url("/mystylesheet.css");

[rest of ContactForm's CSS here]

`;

Notice that the @-symbol on the @import statement must be escaped with a backslash, otherwise Perl will treat it as a variable, which will result in an error.

[ TopCF HomepageInstructionsDownloadBuy ]

 

How do I use the /contact shortcut URL?

On most servers, you can use www.yoursite.com/contact instead of www.yoursite.com/cgi-bin/contact.cgi to access ContactForm.  But first, you must get the full contact.cgi URL working.  Once that's working, you can try these shortcut URLs:

www.yoursite.com/contact/index.php
www.yoursite.com/contact/index.shtml

If one or both of those works, then delete the index file that doesn't work (if any), and then you should be able to use this shorter URL:

www.yoursite.com/contact

If neither index page works, then try www.yoursite.com/contact/call_cf.php instead.  If that works, then edit the index.php file, remove the "#" from the front of the call_cf line, and add a "#" to the front of the virtual line.  Now www.yoursite.com/contact/index.php should work, and if you delete the index.shtml file, then www.yoursite.com/contact should work too.

If your server runs IIS rather than Apache, you can also use the Default Content Page feature to enable the shortcut URL.  Open your IIS manager, find the /contact/ directory, right-click on it and choose Properties.  Go to the Documents tab, check the "Enable default content page" box, and add "contact.cgi" to the top of the list.

If your server doesn't support any of the above methods, and you don't want to upgrade to a better hosting company, then you can use the not-quite-as-nice META Refresh method.  Copy the /contact/index-redirect.html file to /contact/index.html and then edit the index.html file.  In it, replace "mysite.com" with your domain name.  Now yoursite.com/contact will auto-redirect your visitors to yoursite.com/cgi-bin/contact.cgi.

[ TopCF HomepageInstructionsDownloadBuy ]

 

How do I embed ContactForm in another page, or within my site's existing layout?

Embedding Method A: call contact.cgi from your PHP or SSI/shtml page:

  1. First make sure ContactForm is installed and working: visit yoursite.com/cgi-bin/contact.cgi and you should see the contact form.  If not, you need to fix that before trying to embed it.  Important note: if you install ContactForm in a non-standard location (somewhere other than yoursite.com/cgi-bin/contact.cgi), then you'll need to adjust the "/cgi-bin/contact.cgi" throughout these instructions, to match wherever you've actually installed it.
  2. Create your cf.js and cf.css files as explained here, then put them in the /contact/appdata folder on your server.
  3. Within the <head> section of the PHP or SSI/shtml page where you want to embed ContactForm, add the following two lines:

    <script type="text/javascript" src="/contact/appdata/cf.js"></script>

    <link rel="stylesheet" type="text/css" media="all" href="/contact/appdata/cf.css" />
  4. If your page is a PHP page, then add the following line to it wherever you want ContactForm's output to appear:

    <?PHP virtual("/cgi-bin/contact.cgi?encembed=yes&" . $_SERVER['QUERY_STRING']); ?>


    Or if your server doesn't support the PHP virtual() function, use this line instead:

    <?PHP require($_SERVER['DOCUMENT_ROOT'] . "/contact/call_cf_embed.php"); ?>


    Or, if your page is a plain HTML page with an extension of .htm or .html, rename its extension to .shtml and then add the following line to it wherever you want ContactForm's output to appear:

    <!--#include virtual="/cgi-bin/contact.cgi?encembed=yes&$QUERY_STRING" -->
  5. Now visit www.yoursite.com/mypage.php (or shtml) and you'll see ContactForm in the page.

Embedding Method B: call contact.cgi directly, and let it display your HTML template file:

If your server doesn't support the PHP/SSI/shtml that's necessary for Embedding Method A (above), then you can use an HTML template file instead.  Your page will look exactly the same as with Method A; the difference is that Method B requires you to use the full URL to the CGI script itself, and not use the /contact shortcut URL, since your server doesn't support any way to use that.

First you create an HTML file in whatever way you normally create web pages.  Name this file encodable_app_template.html.  In the <body> section of the file, wherever you want ContactForm's output to go, put the string %%encodable_app_output%%.  Then upload this HTML file onto your website in its top level (i.e. not in a subfolder).

Now open your contact_prefs.cgi file and find the $PREF{encodable_app_template_file} setting; set that to "%PREF{DOCROOT}/encodable_app_template.html";

Now visit www.yoursite.com/cgi-bin/contact.cgi and it'll use your template file.

Embedding Method C: hard-coding ContactForm's HTML into your own page:

If you're on a really pathetic server that supports none of the above methods, you can simply visit yoursite.com/cgi-bin/contact.cgi in your browser, then view the source code, and then copy and paste it as a hard-copy into your own page.  However, note that if you do this, any subsequent changes that you make to the prefs will not be reflected in your page, since you hard-coded the HTML from a previous execution of ContactForm, so if you do change your prefs in a way that affects the contact form, you'll need to re-do the hard-coding of your page from ContactForm's new source code.

[ TopCF HomepageInstructionsDownloadBuy ]

Errors

 

I get an Internal Server Error!

If this happens after you edit your contact.cgi file, then the simple solution is: don't change contact.cgi at all.  Instead, only edit contact_prefs.cgi, as explained above.

But if you haven't edited your contact.cgi file and you still get an Internal Server Error, or if you absolutely need to edit contact.cgi, then see the Internal Server Error page for solutions to this problem, which is most likely caused by an installation issue and not a problem with ContactForm itself.

[ TopCF HomepageInstructionsDownloadBuy ]

 

I get an "undefined function virtual", "request execution failed", or "exec disabled" error.

The "undefined function virtual" error means your server doesn't support PHP's virtual() function.  This is only a minor issue, and it is not a problem with ContactForm itself.  It just means you need to use a different method for calling ContactForm from a shortcut URL.  (See the shortcut FAQ item for more details and alternatives to the virtual() function, but read the rest of this FAQ item first.)

The "exec() has been disabled" (supposedly for "security reasons") error means your server doesn't support PHP's exec() function.  This is only a minor issue, and it is not a problem with ContactForm itself.  It just means you need to use a different method for calling ContactForm from a shortcut URL.  (See the shortcut FAQ item for more details and alternatives to the virtual() function, but read the rest of this FAQ item first.)

The "request execution failed" error most likely means that your contact.cgi isn't installed quite right.

In all of these cases, the first thing to do is get ContactForm itself installed and working: visit www.yoursite.com/cgi-bin/contact.cgi and make sure that works.  Only after that works properly should you try to get a shortcut URL working (e.g. www.yoursite.com/contact/ or www.yoursite.com/contact/index.php or www.yoursite.com/contact/index.shtml).  If your contact.cgi gives you an Internal Server Error, it's most likely a chmod/permissions problem, but see this page for full details on how to fix it.

[ TopCF HomepageInstructionsDownloadBuy ]

Shopping Cart

Your cart is empty.

Client Quotes

I just wanted to say that yours is the first product that I've tested so far that hasn't failed on handling uploads.  This is going to work for a print company, so they are handling nothing but large files and all the other solutions I've tried so far have not been reliable.  So far yours has been 100% successful in my tests.
– Kevin H.
The amount of customization in the program is incredible.  I was able to integrate it into my existing page layout relatively simply.  I was also able to easily customize the look/feel to match the current site.
– Jason M.
Thank you VERY much for all of your help.  You've really impressed me.  We have support agreements for other software that costs thousands of dollars / year (just for the support), and most of them aren't as helpful as you have been.
– Keith Y.
FileChucker is working great...  Clients love it.  Vendors love it.  We love it.
– Gerry W.
FileChucker is helping drive the backend of several high profile entertainment sites for people like Shania Twain and Dolly Parton.  We're also using it to drive backend file uploads for a multi-billion dollar banking institution.  It's a great product.  We've tried other "chucking" upload solutions with progress bars using flash and php, but nothing works as reliably as FileChucker.
– Michael W.
I just want to say you guys really stand alone in that you have a quality product and you provide genuine customer service.  It's sad but those qualities are seldom found separately, much less together.  Thanks again for your time and help.
– Alex S.
I looked all over trying to find a simple cgi script.  I found that FileChucker was by far the best.  If you have issues with your hosting service's php.ini max upload size then this is the way to go.  Looking forward to future enhancements.
– Bob C.
Thanks again for a great product and great support - beyond expectations.
– Greg S.
I want to thank you for your efforts on Userbase. It has become an integral part of our business and has allowed us to branch out and begin using automation on a lot of our processes. Userbase has become the gateway to advancement for our company's processes for our clients and employees.
Just one word: Fantastic.  10-minute job to plug FileChucker into my app, and it now works a treat.  It's through the hard work by people like yourselves that make my job so much easier.  Congratulations on an outstanding product... Many many thanks.
– Sean F.
You've done a wonderful job with FileChucker and UserBase, and they have made a big difference to how our website runs.
– Nicholas H.
I just installed the demo of your product and got it up and running in no time.  I searched high and low for a decent login script and thank God I found yours.
– Adrian F.
Why didn't I just do this from the get-go?  So much easier.  Thanks for your work.  FileChucker makes my work easier.
– Dominic M.
Nice script, it's saving the day on our project.
– Aaron W.
Our members think your software is fantastic...  I would recommend your software and your company to anyone.  Thanks for all your help.  It has been a pleasure dealing with you.
– Tommy A.
FileChucker is a great drop-in solution for file uploads, and worth every penny of its very reasonable cost.  Encodable's support is excellent to boot.
– Loren A.
Do you know how rare it is to have a "canned" shopping cart that can easily do complex pricing options on a single item?  Basically, they don't exist!  I have looked.  Everywhere!  And the few that might even come close to CornerStore's functionality cost a fortune!
– Tashina P.
The work, the thought and the organization you put into this app is incredible.
– Bruce C.