Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1216 2012-08-06 09:48:50
Re: zem_contact_reborn 4.0.3.20
When you create a new user in TXP, an email gets sent out as well. Does that work?
Offline
#1217 2012-08-06 14:34:42
- gnarasi
- New Member
- Registered: 2007-03-06
- Posts: 8
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
When you create a new user in TXP, an email gets sent out as well. Does that work?
No Sir.
Offline
#1218 2012-08-06 18:28:01
Re: zem_contact_reborn 4.0.3.20
Check your logfiles for errors.
Offline
#1219 2012-08-06 20:48:28
Re: zem_contact_reborn 4.0.3.20
Gnarasi, unless you are planing to have your live site in your local server you may find that the issue you are currently faced with will disappear once you move it to your host.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#1220 2012-08-07 06:37:55
- gnarasi
- New Member
- Registered: 2007-03-06
- Posts: 8
Re: zem_contact_reborn 4.0.3.20
colak wrote:
Gnarasi, unless you are planing to have your live site in your local server you may find that the issue you are currently faced with will disappear once you move it to your host.
I do not have a wb host now.
Will try later.
I thank all for the suggestions.
Amen
Offline
#1221 2012-09-05 06:13:48
Re: zem_contact_reborn 4.0.3.20
Hello people, am wondering if there’s a way to put a custom message in the email that arrives … something like:
Hello there!
We’ve received your message with the following details:
… : …
… : …
… : …
I did read that HTML emails are not part of the plugin’s scope, nor planned, but nonetheless it will be a great add-on if made possible some day.
Cheers,
Husain
Offline
#1222 2012-09-05 08:47:56
Re: zem_contact_reborn 4.0.3.20
It’s not easy. My dream was to modify the plugin so that uses a form for the message with fields posted by the user replacing variables in the form. But someone suggested that was a bad idea (can’t remember why).
For now, I ave just modified the plugin code to format emails in a specific way (eg. field labels aren’t included in the message) but its not easily customized for different contact scenarios.
Offline
#1223 2012-09-05 09:28:55
Re: zem_contact_reborn 4.0.3.20
Perhaps a new version is in the making, plans for its future does say custom email formatting in HTML, so eager for that to happen :)
Offline
#1224 2012-09-05 16:27:52
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: zem_contact_reborn 4.0.3.20
For the first time I need a fixed ID for a zcr form. The ID seems to look randomly chosen, on the other hand it’s the same in a different browser, so doesn’t seem a session random. Can I rely on always finding this same ID?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1225 2012-09-05 16:30:31
Re: zem_contact_reborn 4.0.3.20
The ID is generated based on the contents of the form and the attributes of the ZCR tag. So it’s stable as long as you don’t upgrade ZCR. Nevertheless, you shouldn’t rely on it to never change in future ZCR versions (although most likely, it won’t change then either).
Offline
#1226 2012-09-05 18:45:48
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: zem_contact_reborn 4.0.3.20
Thanks for the super-quick reply, Ruud!
ruud wrote:
The ID is generated based on the contents of the form and the attributes of the ZCR tag.
Ah, I see: I removed some elements, and the ID changed. That required me to keep that in mind any time the form is altered. Is there a way to circumvent my scatterbrain and store the ID in a variable for re-use in the Javascript? (It probably needed to sit in the zcr form then, I assume.)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1227 2012-09-06 07:22:02
Re: zem_contact_reborn 4.0.3.20
Ruud,
When I use <txp:zem_contact_email />, no email gets sent, but when change it to <txp:zem_contact_text /> if works just fine … I tried this on a couple of sites, and it’s the same. Any ideas what could be the cause?
EDIT: The plugin works perfectly on my localhost, so I guess it’s something to do with Dreamhost’s mail set up. Let’s see if they can help. Seems it wants the “from=” to be an email on the same domain, else it won’t accept the sender’s email address.
Last edited by husainhk (2012-09-06 08:05:03)
Offline
#1228 2012-09-06 08:56:20
Re: zem_contact_reborn 4.0.3.20
uli wrote:
Is there a way to circumvent my scatterbrain and store the ID in a variable for re-use in the Javascript? (It probably needed to sit in the zcr form then, I assume.)
If you need the ID in javascript, you can probably start from an element inside the form, track it to it’s parent form and get the ID from there (or put the form inside a div use that to find the form or perhaps, knowing how many forms you have on a page, use that to target a specific form)… but then you wouldn’t really need the ID anymore, just the reference to that object (as you would normally do with “getElementByID”)
Offline
#1229 2012-09-06 13:09:45
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
as you would normally do with “getElementByID”
Thanks for your reply, Ruud. I’m afraid that would be too much for me: I don’t “normally” do it ;) I’ve not yet learnt a script language, I can alter what I find as long as it’s human readable and doesn’t expect too much prior knowledge.
But I discovered in this topic last night a jQuery calculation script that doesn’t require an ID and reads automatically into the forms contents. Thanks, photonomad, for the link, also for the update .text -> .val.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1230 2012-09-09 13:15:04
Re: zem_contact_reborn 4.0.3.20
Hi Ruud,
This is the last hurdle in getting my zem_contact form and saving it’s contents to a database work as intended. I need to ensure that the email field value is unique at form submission. In phpMyAdmin, I’ve declared the ‘email’ field to be unique and the code you’ve sent works, i.e. it doesn’t populate duplicate emails. All I need is a way to show an alert after form submission if a duplicate email is used in the form, for the user’s sake, so that the zem_contact doesn’t carry out its action and the database doesn’t get populated.
Here’s the code you helped out with earlier:
<?php
global $zem_contact_values;
if( !empty( $_POST['zem_contact_submit'] ))
{
$formTitle = doSlash(trim(ps('title')));
$formFirstName = doSlash(trim(ps('first_name')));
$formLastName = doSlash(trim(ps('last_name')));
$formEmail = doSlash(trim(ps('email'))); // Need to intercept if same email is entered at zem_contact form submission, if so, don't perform zem_contact's action and population of database
$formMobile = doSlash(trim(ps('mobile')));
$formSecret = doSlash($zem_contact_values['voucher_code']);
if(!empty($formFirstName) and !empty($formEmail))
{
$result = safe_insert('voucher_codes', "timestamp=NOW(), title='$formTitle', first_name='$formFirstName', last_name='$formLastName', email='$formEmail', mobile='$formMobile', voucher_code='$formSecret'");
if (!$result) echo mysql_errno() . ": " . mysql_error();
}
}
?>
Offline