[Snippet] InquiryForm
#1
Posted 24 March 2007 - 03:39 AM
File Submitter: lloyd_borrett
File Submitted: 24 Mar 2007
File Category: Feedback / E-Mail Forms
/**
* ---------------------------
* Snippet: InquiryForm
* ---------------------------
* Version: 1.3 - 2007-03-24
*
* Description:
* This snippet generates a form, for an Inquiry Form.
* It first outputs the form, then it checks the responses
* that the sender has given, plus any other required fields.
* Finally it produces a "message-has-been-sent" page if
* everything is okay, sends an email containing the
* form details to the email address specified plus
* a copy to the user.
*
* This snippet can check for valid Australian Postcodes,
* phone numbers, and mobile phone numbers.
* You'll need to turn this checking off in the configuration
* section if you want to accept those values for other countries.
*
* NOTE: Make sure the Etomite document the snippet is called
* from is non-Cacheable!
*
* See it online at http://www.chapman-hill.com/request-info.htm
*
* Usage: [!InquiryForm
*
* ?div=[false|0] | someclass
* if not specified then div isn't output
* if false|0 then the div isn't output
*
* !]
*
* History:
* 2007-03-24 1.3 Lloyd Borrett
* Made BCC email address easily configurable.
* Turn on or off Australian phone, mobile and postcode checking.
* URL of privacy policy made a configuration option.
* Added ability to pass a div class wrapper, if div required.
* Updated Postcode checking to handle 3 digit postcodes.
*
* 2006-11-14 1.2 Lloyd Borrett
* Used fieldset to better group label and input.
*
* 2006-11-09 1.1 Lloyd Borrett
* Added City and Postcode fields.
*
* 2006-09-21 1.0 Lloyd Borrett, www.borrett.id.au, lloyd@borrett.id.au
* Adapted from EnergyAgreement snippet by Lloyd Borrett which was
* in turn adapted from the ContactMe 0.1 snippet by Vassili Slessarenko
*/
Click here to download this file
#2
Posted 08 May 2007 - 06:59 PM
I'm having a little trouble getting this snippet to work. I have copied the snippet as-is and only changed the email address to test it out. No matter what I do, I cannot get it to send the email. I always get the "Problem - The email couldn't be sent" message.
Originally, I was getting the SAFE_MODE error and had my hosting company turn off SAFE_MODE. Now I just cannot get it to successfully send.
I have narrowed it down to being a hosting specific issue. I tested the script on another hosting company that I use and the script works fine.
Specs for the hosting company that does not work on:
Linux/Apache 2.0.5.4 /MySQL/PHP Version 5.0.4-0.9sarge1 (Debian GNU/Linux)
Also, I am not sure if this has anything to do with it, but I have attached a screencap of the php configuration screen in my hosting admin that shows the php modules that are currently installed or not installed.
Any ideas on what might be the issue? Could it be a PHP 5 issue? Or maybe a php module that needs to be activated?
Thanks,
Bryan
Attached Files
Edited by gbryanmiller, 08 May 2007 - 06:59 PM.
#3
Posted 08 May 2007 - 07:36 PM
From the hosts knowledgebase:
Quote
Any idea how I can convert this to using SMTP based on the info provided by the host?
Thanks,
Bryan
#4
Posted 15 May 2007 - 08:13 AM
If not: Other solutions for at contactform ?
Other snippets I have tried/seen have problems regarding security / mis-use as mail-relay.
#5
Posted 15 May 2007 - 01:34 PM
#6
Posted 15 May 2007 - 08:10 PM
#7
Posted 20 May 2007 - 11:20 PM
#8
Posted 11 June 2007 - 07:50 AM
Name:
First name:
Adress:
Postcode:
City:
Telephone: not required
Email: not required
I removed the text-box, check box and company thing..
I'm dutch, the site is dutch.. so I changed all the english words to dutch, only the code for email stays the same.
I don't get any send errors, but when I receive the mail it doesn't print the info I filled in.. so I receive a mail like this (in dutch)
Achternaam: ---blank---
Voorletters: ---blank---
Adres: ---blank---
Postcode: ---blank---
Woonplaats: ---blank---
Telefoonnummer: ---blank---
Email: mytestemail@yo.nl
So, it's only printing the email. I'm not surprised, because that's the only original code I used. I'm missing something to print the mail correctly.. but what?
Edit: I solved the problem.. I deleted some lines that were necessary.
Edited by svteg, 19 June 2007 - 09:12 PM.
#9
Posted 19 June 2007 - 11:14 AM
Its my first week with Etomite and I'm on a tight learning curve with PHP!
I'm trying to make a simple inquiry snippet so I thought I would start with this one. I create a ne snippet, cut and paste the cose and when I save the snippet I get:
Not Acceptable
An appropriate representation of the requested resource /manager/index.php could not be found on this server.
Apache/1.3.37 Server at www.rcracetimes.com Port 80
What is this all about!
#10
Posted 19 June 2007 - 01:13 PM
RobNelson, on Jun 19 2007, 07:14 AM, said:
Its my first week with Etomite and I'm on a tight learning curve with PHP!
I'm trying to make a simple inquiry snippet so I thought I would start with this one. I create a ne snippet, cut and paste the cose and when I save the snippet I get:
Not Acceptable
An appropriate representation of the requested resource /manager/index.php could not be found on this server.
Apache/1.3.37 Server at www.rcracetimes.com Port 80
What is this all about!
Please supply us with additional information so we can better assist you in resolving this issue... The following information, complete with version/release will be of great help... If the issue is browser-specific also include browsers tested and the results of each...
Etomite Version
Server Operating System
Server Software Version
PHP Version
MySQL Version
#11
Posted 02 July 2007 - 01:47 PM
I can't get this snippet to work, especially I can't figure out how to place the snippetcall.
I tried several ways (always with cache off) but no way...
Could you please give me an example of a call where the form is displayed on the page with no specific CSS class?
Thanks in advance.
Hans
#12
Posted 02 July 2007 - 02:14 PM
Hans, on Jul 2 2007, 09:47 AM, said:
I can't get this snippet to work, especially I can't figure out how to place the snippetcall.
I tried several ways (always with cache off) but no way...
Could you please give me an example of a call where the form is displayed on the page with no specific CSS class?
Thanks in advance.
Hans
#13
Posted 02 July 2007 - 02:23 PM
I tried that on a page with a chunck in it and therefor I think it didn't work.
I now placed the snippet on a blank page and it works.
Hans
#14
Posted 02 July 2007 - 02:43 PM
Hans, on Jul 2 2007, 10:23 AM, said:
I tried that on a page with a chunck in it and therefor I think it didn't work.
I now placed the snippet on a blank page and it works.
Hans
#15
Posted 11 August 2007 - 09:19 AM
Parse error: syntax error, unexpected T_STRING in /home/users/mysite/www/etomite/index.php(506) : eval()'d code on line 203
Can you tell me what could be the problem?
#16
Posted 11 August 2007 - 04:12 PM
dennus, on Aug 11 2007, 05:19 AM, said:
Parse error: syntax error, unexpected T_STRING in /home/users/mysite/www/etomite/index.php(506) : eval()'d code on line 203
Can you tell me what could be the problem?
#17
Posted 30 October 2007 - 11:14 AM
The error is when trying to save the snippet in the library.
Quote
An appropriate representation of the requested resource /manager/index.php could not be found on this server.
This appears in the RHS frame of the Etomite manager: on-click "Manage Resources" the snippet has not saved.
I have narrowed it down to a single line: Without this line, the snippet saves fine. However, this line can not be saved (even by itself and commented out).
LINE 774:
//$headers .= "Bcc: " . $address_2nd . "\r\n";
[EDIT] I have actually narrowed it down to the characters:
Bcc:[/EDIT]
Is anyone aware of server settings that could effect Etomite's ability to save this code? Or a workaround that lets the user still access the Bcc: feature in the snippet?
I am using cathode's server Eto 0.1.6.4 on LAMP.
Edited by Cris D., 30 October 2007 - 07:36 PM.
#18
Posted 30 October 2007 - 07:55 PM
#19
Posted 21 November 2007 - 04:43 PM
Attaching a picture to the Inquiry Form
Have been using this form succesfully for quite a while now and the work-around has been to ask the user to attach a picture and reply to the message. It's not the greatest way to do things and it would be so much easier on visitors to my site to be able to simply click a browse button to select a picture and attach it to the form before clicking the send button.
Appreciate any help I can get...thanks!
#20
Posted 21 November 2007 - 05:51 PM
Mr. Tech, on Nov 21 2007, 11:43 AM, said:
Attaching a picture to the Inquiry Form
<<< SNIP >>>
With a contact or inquiry form you need to be concerned with how the image is handled once it has been selected... Will the image simply be added as an attachment to an email or will it be embedded in the body of the email...??? Will there be a limit on the size of the image selected...??? Will you only allow specific mime types for the images...??? Should the image be resized if it is beyond a certain size...??? Should the image be renamed or use the original name, and if you use the original name will it need to have the name modified to proper cross-platform naming conventions...??? The list goes on...
I guess what I'm getting at is that in order to even begin to provide answers we would need more details regarding what types of images would be uploaded and the intended use of the images... Without at least a small amount of information other than it being an image upload, we can't be of much help - only raise more questions...
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












