Home  ›  FAQs

Frequently Asked Questions

The following FAQs are meant to help you with the most common issues one has when dealing with AJAX Form Pro. It also contains solutions to common problems (especially regarding sessions and writing permissions) that some shared hosting have. If you can’t find any solution for the problem you’re having in this page OR in all the posts from this wiki page, then use the “Customer Service” form to contact me.

I want to customize the CSS style and the Look of the form. How can I do that?

There are currently 6 templates that you can use to style the form. They are basic styles with white background and black text. If you wish to customize your form by adding images, different background and text color, paragraphs etc. then it’s strongly recommended to create CUSTOM styles. To do that go to “Templates” and choose a base style that will be the foundation of your custom style (could be in-fields label layout or vertical labels layout etc.). After you create the custom template, you can apply it to the form you created by selecting it from the “Layout” section within the Form’s Configuration/Settings page.

Back To Top

Some parts of the form are not showing in Internet Explorer. Why?

If you and your visitors are having trouble viewing the form in Internet Explorer (often the security code is not displayed), then you do not have a DOCTYPE set in your HTML page.

If your webpage starts with something like:


Consider updating it to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">

Back To Top

The text “Submitting” appears after form submit and stays there ‘forever’. Why?

If that happens, you should enable the “Debug” tool from the Form’s Configuration Page. In the “Manage Forms” page, check for the “Configs” link, then click “Debug”. Set it to ‘true’, update the configuration, then resubmit the form to see the output from parse.php, which is likely to contain submit errors.

Back To Top

While I’m filling the Security Code I get an Error JS Alert. Why?

If you a popup alert with an error shows up while you’re filling the security code, it’s because you’ve accessed the page from a different host name. For example: you’ve set up www.mydomain.com during the installation of AJAX Form Pro. But you are accessing it without “www” (or vice-versa). The script uses AJAX to communicate with the server and, for security reasons, it doesn’t work between 2 different hosts.

To have it 100% functional with both www and non-www hosts, consider editing your config.php file from the root of the “AJAX Form Pro” directory and update:

// URL Path to AJAX Form Pro
define('URL_PATH_TO_AFP', 'http://www.mydomainname.com/path-to-ajax-form-pro/');


// URL Path to AJAX Form Pro
define('URL_PATH_TO_AFP', 'http://'.$_SERVER['HTTP_HOST'].'/path-to-ajax-form-pro/');
You can have it without ‘www’ too. $_SERVER['HTTP_HOST'] takes care of it by getting the host name that is used in the moment you open the URL containing the form.

Back To Top

Fatal error: Exception thrown without a stack frame in Unknown on line 0

If you get this error when you load a form it means there aren’t enough read/writing permissions on /ajax-form-app/includes/smarty/templates_c/ for Smarty to process the files. Make sure you CHMOD the directory with the right permissions and then reload the form. The error should disappear.

If you do not know how to make the folder writable, checkout the following URL with explanations: http://codex.wordpress.org/Changing_File_Permissions.

Back To Top

When I’m activating the WordPress Plugin, I’m getting an error. How can I fix it?

Make sure the plugin’s directory name is “wp-ajax-form-pro” before making the plugin active.

Back To Top

Is the Form’s Data Saved in the Database and also Sent by Email to the Webmaster?

Yes, these 2 features are available and they can be enabled/disabled. In the form’s settings page you have “Deliverability” which consists in 2 options: “Send Mail after Submit?” and “Save (Archive) Message after Submit?” – set them to either “Yes” or “No”. The submitted data can be edited/deleted and also exported as CSV along with the submission date.

Back To Top

I’d like to edit the Slide-Left FEEDBACK Vertical Button. Is it possible?

Yes, if you have Adobe Photoshop, you can get the PSD source and edit it as you wish.

Click here to download Slide-In Feedback Vertical Button Source Code

Back To Top

The form gets hidden after successful submit. How to keep it visible?

Access the Form’s Configuration Page (“Configs” link when you view the forms’ list) then click on “Basic Configuration”. You will reach a form’s basic settings section. Set “Want to hide the form after submit?” to “False” if you wish the form to be visible after each submit. For instance, this feature is very useful if you load the form within a modal box (lightbox) and you wish to show it every time the Fancybox is reopened.


Back To Top

How to pass value to field via GET from the URL address bar?

To populate the default value of a field (this will replace any default value set in the field’s edit page) through the URL address bar (via GET), you just have to pass the following query string:


Now, if do “name” was set for that field the default value would be “f[field_id]” (e.g. &afp[f500]=your_value assuming that the Field’s ID is 500). If you set any “name”, then it would be &afp[company_name]=your_value IF the actual name of the field is “company_name”.

The ID of the field can be seen when you view the Field’s List (“ID” column after “Type”) or when you’re on the Field’s Edit Page (under title ‘EDIT FIELD PROPERTIES’).

Back To Top

How to Disable Dates from the Past in a Date-Picker?

Click here to access the tutorial that explains you how to change date-picker settings and also disable past dates.

Back To Top

How to get the Latest Stable Version of the Script/Plugin?

To get the latest version of products you’ve purchased (e.g. Standalone Script, WordPress Plugin), go to the following page:
Automatic Update Request
and submit the e-mail address you’ve used to make the purchase.

If no records are found, then go to:
Manual Update Request
and submit a request for new download links by providing essential information about your purchase.

IMPORTANT: If you bought the item through MightyDeals.com or other 3rd party website, you might not be in our main records, therefore you should use the website from which you purchased the script to get the download. For instance, if you’ve used MightyDeals, then you have to use the serial code you got from them to get it from: //www.ajaxformpro.com/mighty-deal/.

Back To Top

Can I install the script in one domain and use the forms on a different domain?

The software is installed and used per domain. So, each website must have a copy of the script installed there. However, you can keep a copy on one domain and then using the iFrame method integrate the forms into other domains. The frame should also have some style applied to it, just as the main page so there won’t be really noticed the fact that the form was loaded from a different domain (example: must have the right height, so the scroll bar won’t appear). It’s like using a 3rd party service to create forms and they give you a code to embed the form into your website, but all the data is stored on their servers.

Back To Top

Failed to write session data (files) error – What to do about it?

If you encounter the following errors when you’re loading the admin panel:

  • Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct
  • Warning: session_start() [function.session-start]: open([…], O_RDWR) failed: No such file or directory

then your hosting account (most likely a shared one) doesn’t have permission to write session data on the default session directory. Your web server is set to save the PHP session variables within your server temporary directory. If for whatever reason PHP cannot save this file, it won’t keep track of the session variables and the login to the Admin Panel won’t work. This is common on Shared Hosting accounts.

Fortunately, this can be fixed by creating a directory on your server and making it writable so the session data files will be written there.

Some customers had this problem and decided to come with a fix. In base.php, find the following lines:

// Path to the directory where the sessions will be stored (in case USE_CUSTOM_SESSIONS_DIR is set to true)
define('AFP_CUSTOM_SESSIONS_DIR', $afp_conf['local']['path_to_afp_admin'].'/tmp/');

You need to set to ‘true’ the value of the constant ‘AFP_USE_CUSTOM_SESSIONS_DIR’. The default directory for saving the files is ‘tmp’, within the ‘admin’ folder. However, it can be changed if you want to. You can also rename ‘tmp’ to a different name for security reasons so the new block of code would look something like this:

// Path to the directory where the sessions will be stored (in case USE_CUSTOM_SESSIONS_DIR is set to true)
define('AFP_CUSTOM_SESSIONS_DIR', $afp_conf['local']['path_to_afp_admin'].'/e8c5a5849ce9188d5d322993457e113a/');

Make sure the directory ‘e8c5a5849ce9188d5d322993457e113a’ (just my example, you can have any name you wish) actually exists in its location and it’s writable.

That’s it! Refresh the script and try to sign in again.

If you still have problems, after doing all the above steps, consider contacting your hosting company about this problem as they should take care of it (if they are professional indeed) by setting the right sessions path and the permission to write to it.

Back To Top

How to Save the Message into the Database?

Go to the “Forms” list and click “Configs” to the form where you want to have the messages saved in the database. Click on “Deliverability” and then select the “Yes” radio for “Save (Archive) Message after Submit?”. That’s all!

Back To Top

The form was successfully submitted, but I haven’t receive any email? What can I do?

First of all, make sure you’ve gone through all the following steps:

1. You need to add a recipient/webmaster in the “Recipients” page (accessible from the main menu of the Admin Panel)

2. In the Form’s Configuration page, locate the “Webmasters” box and select the recipient(s) that should get the recipient

3. Lastly, in the “Deliverability” box, mark “Send Mail after Submit?” as “Yes”.

If you completed all the above steps and you still don’t get the email:

1. Make sure the actual email address is written correctly

2. Enable the “Debug” tool to see the response from the parse page that is actually processing the information and sending the email. If you see a message such as “Could not instantiate mail() function” then it’s likely mail() is not activated by your hosting company or you are testing the script on localhost which by default doesn’t have the function activated.

3. If you’ve enabled “SMTP” as a way to send the emails, make sure the configuration, as well as the login info is correct. You can see if the email was sent by activating the “Debug” tool which will show you the error in case of failure.

Back To Top

Your access to this form has been temporarily restricted due to multiple failed login attempts. What can I do about it?

After several failed login attempts, the access to the login page is restricted. To unluck it, do the following:

1) Connect to the MySQL database, preferably through phpMyAdmin and browse `[table_prefix]_visitors_activity` (where [table_prefix] is the prefix you’ve chosen when you installed AJAX Form Pro).

2) Go to http://www.tools4noobs.com/online_php_functions/ip2long/ and get your IP2Long value from your IP Address. Remove the rows that match that value in the `ip` field from the `[table_prefix]_visitors_activity` table.

Back To Top

Do I need to create custom templates if I want to make custom changes to my form?

Although you can make changes to the existing layouts, It is strongly recommended to create your own templates from the existing (base) ones if you wish to customize the CSS and the HTML of a form as those changes will apply only to that form.

The already existing templates (which can’t be deleted from the Admin Panel as you can see) are there as the base of the custom templates that you want to create. Once you create the “custom” template, you can make changes to it as you wish and associate it with 1 form or more if there are common things you want to load.

Back To Top

What’s the purpose of “Default Form Configs”?

The configuration saved in “Edit Default – Form – Configuration” page is automatically applied to the newly created forms. This is the base (default) configuration of a form.

Once the form is added, its settings can be changed to your needs, as each form has its own layout and configuration.

Back To Top

How to send POST data to a 3rd party script/page?

AJAX Form Pro can store the messages in the database, that can be later edited and exported. However, you can also send the POST data to a 3rd party script if you use the “Send POST Data to Remote URL” feature in the Form’s Configuration Page. Just activate it and put the URL that will process the POST vars (could be for a newsletter subscription, forum/site registration etc.).

Back To Top

Uploading files doesn’t work after Enabling the “Attachments” Feature

In case you get an error such as: “Warning: mkdir() [function.mkdir]: Permission denied“:

Files uploaded are stored in a directory and you need to make sure there are sufficient writing permissions to have the files moved there. In base.php, look for the following line:
'path_to_uploader_uploads' => $afp_script_path.'uploader/uploads/'

By default the folder is named “uploads” and is located in /ajax-form-app/uploader/uploads/. Make sure you make it writable and re-try uploading the files.

PS: You can rename the “uploads” folder to a different name for better security. Don’t forget to rename it in base.php too.

If you do not know how to make the folder writable, checkout the following address: http://codex.wordpress.org/Changing_File_Permissions. It’s from the WordPress Docs but the concept that should be applied is the same. You need to chmod the directory with the right permissions.

Back To Top

Optimization WordPress Plugins & Solutions by W3 EDGE