Jump to content


[Snippet] kMail 1.1


31 replies to this topic

#1 Dean

    Loves Etomite Forums!

  • Admin
  • 4,745 posts
  • Gender:Male

Posted 04 January 2008 - 01:19 PM

File Name: kMail 1.1
File Submitter: Dean
File Submitted: 4 Jan 2008
File Updated: 28 Jan 2008
File Category: Feedback / E-Mail Forms

kMail Contact Form

Click here to download this file

#2 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 19 January 2008 - 05:25 PM

Hi Dean, I don't see in the snippet how to call it in a document. Should the cache be turned off for the document?

Is it:

[!kmail!]

Thanks, Karen

#3 Dean

    Loves Etomite Forums!

  • Admin
  • 4,745 posts
  • Gender:Male

Posted 19 January 2008 - 05:46 PM

I didn't write the snippet, it's the version that got lost on the forums a bit back, but yes, uncache the document and call it [!kmail!]

#4 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 19 January 2008 - 05:59 PM

Thanks Dean, I have is showing a form now. It wasn't clear in the chunks.txt file that you needed to make separate chunks from that file.

Here it is so far - needs some tweaking:
http://www.roswellrotary.com/contact2.html

#5 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 19 January 2008 - 10:19 PM

I have it working fine, but when I added the field 'company' - I can't get it to output in the email results.
http://www.roswellrotary.com/contact2.html

Does anyone have any samples of adding more fields to this form. Also I don't need every field to be required. I stripped the code for 'subject' to be required from the snippet - will that affect security?

Also, the phrase 'To avoid spam emails' on the contact - 'aviod' is misspelled.

#6 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 21 January 2008 - 07:10 PM

Has anyone successfully added extra fields to this kmail snippet?

#7 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 21 January 2008 - 09:27 PM

Hi Karen,
I have never used this snippet, but it looks good, thanks for bringing it to my attention. Firstly, the "avoid" is in the chunk that comes with the snippet and can easily be fixed there. Second, I have never added or removed fields to this snippet but the code is pretty entrenched with error checking, chunk and resource data array matching, javascript and language messages, so it isn't a case of just add this at line:xxx and delete this from line:ZZZ It will take a fair bit more effort than that.

#8 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 21 January 2008 - 09:35 PM

I like the captcha part (it makes the user of the form feel more comfortable about security), but was unable to figure out how to add fields. I ended up using Lloyds - InquiryForm - it was much easier to modify. http://www.poolinspectorusa.com/free-estimate

If anyone else has added fields to this snippet, please let me know.

Thanks, Karen

#9 Dean

    Loves Etomite Forums!

  • Admin
  • 4,745 posts
  • Gender:Male

Posted 21 January 2008 - 10:08 PM

How many extra fields were you looking for?

#10 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 21 January 2008 - 10:51 PM

View PostDean, on Jan 21 2008, 04:08 PM, said:

How many extra fields were you looking for?

Just some generic ones: (enough to make the form more flexible)

Company
Address
Zip
State (pull down for U.S.) (optional - may require too much coding.)

They don't have to be required fields.

For instance, I could not get this form using kMail - http://www.villarica.org/contact.html
because I used 'Company' - I couldn't get it to list on the email response form.

I like the multiple recipients and the captcha options - they work well on the city and tourism web sites I maintain.

#11 Dean

    Loves Etomite Forums!

  • Admin
  • 4,745 posts
  • Gender:Male

Posted 21 January 2008 - 11:47 PM

I've had a go, and can't get it to work, sorry :(

Try asking the original creator, Kastor

#12 kastor

    Etomite Forum Fan

  • Member
  • Pip
  • 79 posts

Posted 27 January 2008 - 10:12 PM

View Postkatherholt, on Jan 21 2008, 11:51 PM, said:

Just some generic ones: (enough to make the form more flexible)

Company
Address
Zip
State (pull down for U.S.) (optional - may require too much coding.)

They don't have to be required fields.

For instance, I could not get this form using kMail - http://www.villarica.org/contact.html
because I used 'Company' - I couldn't get it to list on the email response form.

I like the multiple recipients and the captcha options - they work well on the city and tourism web sites I maintain.
Hi,

my snippet only does simple text replacements with the chunks and the given input from the mail form. Therefore it's not very easy to create your own fields and/or remove other ones. Basically, you have to do the following:
  • create the input and name it inside the mail form
  • check the input
  • read the input inside the mail routines and
  • add your field to the mail chunk, at last
  • customize the str_replace call to take your new field and the input into account before creating the mail body
I'll see if I've the time to create a new version of kmail which possibly supports custom fields or make it a bit more easier to add them by yourself.

Greetings, Kastor

#13 WP1

    Etomite Forum Fan

  • Member
  • Pip
  • 104 posts

Posted 28 January 2008 - 03:31 AM

Hi Kastor!

I am also a kMail user and it works fine on the site. However, it would be really cool to also see the functionality added to the snippet that you indicate above.

QUESTIONS
  • Would there be any way to be able to place the form on different pages with different Topics/Departments listed along with different email addresses? Could it be called from the different pages differently to allow this?
  • Or could there be a slight change in the snippet name [for each different page] so that it could be called into specific/different pages so that different Topics/Departments and emails could be listed for these different pages?

Thanks in advance for your response.

WP

Edited by WP1, 28 January 2008 - 03:32 AM.


#14 kastor

    Etomite Forum Fan

  • Member
  • Pip
  • 79 posts

Posted 28 January 2008 - 09:20 AM

View PostWP1, on Jan 28 2008, 04:31 AM, said:


  • Would there be any way to be able to place the form on different pages with different Topics/Departments listed along with different email addresses? Could it be called from the different pages differently to allow this?
  • Or could there be a slight change in the snippet name [for each different page] so that it could be called into specific/different pages so that different Topics/Departments and emails could be listed for these different pages?

on my list...

Greetings, Kastor

#15 Dean

    Loves Etomite Forums!

  • Admin
  • 4,745 posts
  • Gender:Male

Posted 28 January 2008 - 11:20 AM

added version number to original post, so that when you release the next version it has a larger version number, and users know that yours is newer.

#16 WP1

    Etomite Forum Fan

  • Member
  • Pip
  • 104 posts

Posted 30 January 2008 - 01:48 PM

Hello!

It is unclear from looking at the script and in discussion forums if the snippet should be called:

[1] Uncached mode [!kMail!] or
[2] Cached mode [[kMail]]

QUESTION
Could anyone help me with this so that I know if I am calling this script properly?

Thanks in advance,

WP

#17 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,505 posts
  • Gender:Male

Posted 30 January 2008 - 02:12 PM

View PostWP1, on Jan 30 2008, 08:48 AM, said:

Hello!

It is unclear from looking at the script and in discussion forums if the snippet should be called:

[1] Uncached mode [!kMail!] or
[2] Cached mode [[kMail]]

QUESTION
Could anyone help me with this so that I know if I am calling this script properly?

Thanks in advance,

WP

Any snippets which work with Dynamic content, such as forms, should always be called as an un-cached snippet... The reason behind this is that a cached snippet has the results from the first time it is run within a cached page cached along with the page markup itself... This means that any subsequent calls to the page will return the same results as the when the first iteration was cached... So, in the case of a form, none of the form inputs would ever get processed because the document is rendering markup, not running the snippet code itself...

#18 katherholt

    Likes Etomite Forums!

  • Member
  • PipPip
  • 323 posts

Posted 30 January 2008 - 02:28 PM

View PostWP1, on Jan 30 2008, 07:48 AM, said:

Hello!

It is unclear from looking at the script and in discussion forums if the snippet should be called:

[1] Uncached mode [!kMail!] or
[2] Cached mode [[kMail]]

QUESTION
Could anyone help me with this so that I know if I am calling this script properly?

Thanks in advance,

WP

I use it this way:
[!kmail!] - plus the cache on my page is turned 'off'. You can see it in use here:
http://www.villarica.org/contact-us.html
Karen

#19 smartie

    Etomite Forum Newbie

  • Member
  • 11 posts

Posted 14 February 2008 - 06:06 PM

Hi,

Problem:
kmail does not deliver the subject

Solution:
in kmail snippet you have to change some variables.
search for:
'%mailSendSubject%'
and replace it with
'%mailSubject%'

search for:
$mail_SenderSubject
and replace it with:
$mail_Subject

in your chunks open kmail-email
now you can add a line like: Subject: %mailSubject%

#20 Guest_thomass_*

  • Guests

Posted 18 February 2008 - 01:19 PM

Everytime i fill in het form, put the right captcha-code, i get back the message 'The security question is answered wrong!' The cache is turned off, and i call the snippet [!kmail!]. Does anyone have the solution? Thanks-a-lot

Edited by thomass, 18 February 2008 - 01:19 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users