Hello,
i use the contactform plugin and created a custom template. This works great, but is it possible to do something additional?
I would like to be able to check if a given e-mail address is correct and when i receive the email from the contactform i do see my ofn email address as sender, nit the email address of the user who filled the form.
So something like
require;Email;email
instead of
require;Email;text
would be great (to tell the script, that this field is reserved for a valid email).
Is this somehow possible?
Also, is it possible to adjust the message sent from the form? I don't like the "A new comment has been posted on your blog "Netcam Watcher Surveillance Software Blog", to the entry entitled "Contactform"." at the top.
Best regards, Harald
Contact Form questions
You can require fields using the Spam plugin.
And for your last question: Edit your language-file. Search for this line:
And for your last question: Edit your language-file. Search for this line:
Code: Select all
@define('A_NEW_COMMENT_BLAHBLAH', '...');
-
- Regular
- Posts: 474
- Joined: Mon Mar 27, 2006 12:32 am
Sorry? I talk about this contact form: http://www.netcam-watcher.com/blog/page ... tform.htmlDavy wrote:You can require fields using the Spam plugin.
I would like to be able to check for a valid e-mail address. I can define email als required in the spam protector, but this has nothing to do with the contact form plugin, right?
Wouldn't this cause all Comments from the regular entries to have the new line at the top? I just want to "rename" the first line for the Comment Form Messages.Davy wrote: And for your last question: Edit your language-file. Search for this line:Code: Select all
@define('A_NEW_COMMENT_BLAHBLAH', '...');
Last edited by Harald Weingaertner on Sat Jan 06, 2007 1:00 am, edited 1 time in total.
-
- Regular
- Posts: 474
- Joined: Mon Mar 27, 2006 12:32 am
-
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
I can help with the second query, how to change the text that appears in the email. Open serendipity_event_contactform.php in the plugin folder, and do a search for the string A_NEW_COMMENT_BLAHBLAH.
Once you've found it, change it to PLUGIN_CONTACTFORM_COMMENT_BLAHBLAH. Now save and close this file, then for each language file within the plugin folder that you use, add this
Then just change the text. The first and second %s refers to the "Netcam Watcher Surveillance Software Blog" and "Contactform"
Just remember that by making this change if you upgrade the plugin in the future you will have to do this again.
Once you've found it, change it to PLUGIN_CONTACTFORM_COMMENT_BLAHBLAH. Now save and close this file, then for each language file within the plugin folder that you use, add this
Code: Select all
@define('PLUGIN_CONTACTFORM_COMMENT_BLAHBLAH', 'A new comment has been posted on your blog "%s", to the entry entitled "%s".');
Just remember that by making this change if you upgrade the plugin in the future you will have to do this again.
-
- Regular
- Posts: 474
- Joined: Mon Mar 27, 2006 12:32 am
-
- Regular
- Posts: 546
- Joined: Mon Dec 20, 2004 11:57 pm
- Contact:
Hi Harald,
This would be easiest to implement with a javascript added to the plugin_dynamicform.tpl file. You could copy the tpl into you template directory and fiddle with it there. I have a feeling there are quite a few javascript email validators online.
If this won't work (I understand the problems of client side validation), I might be able to put something together towards the end of this month or early next. I'm just really pressed for time right now, and have had some things come up that have really made it difficult to work on s9y right now.
This would be easiest to implement with a javascript added to the plugin_dynamicform.tpl file. You could copy the tpl into you template directory and fiddle with it there. I have a feeling there are quite a few javascript email validators online.
If this won't work (I understand the problems of client side validation), I might be able to put something together towards the end of this month or early next. I'm just really pressed for time right now, and have had some things come up that have really made it difficult to work on s9y right now.
Matthew (Feeling generous?)
-
- Regular
- Posts: 474
- Joined: Mon Mar 27, 2006 12:32 am
Re: Contact Form: Custom target, E-mail validator
Good idea with the validators. I had the same question and will try that, for SPAMprotector doesn't work with dynamicform.tpl (the names of the fields don`t match the SpamBlock).
In custom.tpl, setting input type="text" to "input type="email" does the trick as well.
Which brings me to a couple of other questions:
1. By entering a second email adress field, would it be possible to check if both fields have the same value (id est, adress), to avoid typing errors?
EDIT I have done a solution with a php script here: http://board.s9y.org/viewtopic.php?f=4& ... #p10437961
2. How can I set a custom target page after someone has sent a message? Id est, instead of the custom "Thank You" (or whichever text has been written in the plug-in interface), redirect the user automatically to a custom static page and away from the contact form page.
A target (say, staticpage_thanks.shtml) specified as a formaction just ends up with a staticpage blended with an entrypage (id est, the conact form page again).
Is there a passibility that allows a redirection to a completely new page?
I have now done a workaround by including the welcome text into the tpl file, after <form>. That works as well.
In custom.tpl, setting input type="text" to "input type="email" does the trick as well.
Which brings me to a couple of other questions:
1. By entering a second email adress field, would it be possible to check if both fields have the same value (id est, adress), to avoid typing errors?
EDIT I have done a solution with a php script here: http://board.s9y.org/viewtopic.php?f=4& ... #p10437961
2. How can I set a custom target page after someone has sent a message? Id est, instead of the custom "Thank You" (or whichever text has been written in the plug-in interface), redirect the user automatically to a custom static page and away from the contact form page.
A target (say, staticpage_thanks.shtml) specified as a formaction just ends up with a staticpage blended with an entrypage (id est, the conact form page again).
Is there a passibility that allows a redirection to a completely new page?
I have now done a workaround by including the welcome text into the tpl file, after <form>. That works as well.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport