Custom form on exported website

Hi @Kirill_Krysanov, sure no problem. I wanted to make a quick summary of the issues I found, so that you can check this yourself in the future :smile: There are few things to be aware of when using your own formmail.cgi script on your own server:

A. Make sure the hidden fields in the exported html do not have any spaces, and that the exported hidden input fields have this exact format:

<input type="hidden" name="recipient" value="enter recipient email address">
<input type="hidden" name="subject" value="Form submission">
<input type="hidden" name="redirect" value="http://www.yourdomain.com/successpage.html">
<input type="hidden" name="required" value="name,email">
<input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT">
<input type="hidden" name="sort" value="alphabetic">

For some reason, the exported site code for these hidden form fields, had extra spaces and the Action Property field had extra quotes, causing some issues. When entering the url in the Action field, do not paste in the quotes into that field, just the url. I think the issue was some copy and paste thing.

My screenshot below, shows the extra spacing and formatting on those input hidden fields, that needed to be corrected:

B. Anytime formmail.cgi is used, it is likely the hosting provider has some restriction, that the recipient email must be using an email from the same domain. It is possible to modify the formmail.pl script on the server side, by adding the @referers information, allowing the formmail.cgi to send notifications to emails not in the same domain. If you need to do this, then you probably have to contact your hosting provider and get their assistance. Here is some additional information on the @referers :smile:

http://support.lexiconn.com/kb/questions/71/formmail.cgi+Gives+Me+An+Error+(Bad{47}No+Recipient)

C. The redirect in the hidden field, should be pointed to a URL to be used as the success page after a form is submitted. So create a page on your site that will be used after export and put the url to that page in the value property:

 <input type="hidden" name="redirect" value="http://www.yourdomain.com/successpage.html">

D. When using external forms processors, the success and failure messages are disabled. You might be able to code something yourself for this, but it is outside the scope of the support we provide (we do not provide support for custom code).

E. You may be able to make the sender of the email the sender of the form, but you would have to modify or create a configuration for this using some custom perl script, but this too is outside the scope of our support. You can always paste a support topic for that in the forum, if there are some perl script guru’s out there. I would also contact your hosting provider, because all mail sending is handled by their server, their hosting.

F. I am not sure what you mean by "the title of the email is the selected item from “Asia”. I guess the formmail script is taking that value and setting it as the title of the email. Again, this is something that if you needed to configure, you will probably have to get some help from the hosting provider, explain the situation, give them your page url and ask if they can help you to change the way the formmail.cgi script is configured to run

I hope this helps, cheers, Dave

1 Like