Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#646 2009-07-27 13:43:17
Re: zem_contact_reborn 4.0.3.20
Thanks Ruud… any way you can think of to append it to the subject line?
Offline
#647 2009-07-27 15:33:11
Re: zem_contact_reborn 4.0.3.20
Hmm… in your script, create a global variable ($googlerror) that contains the error message.
Then set up zem_contact to use a subject_form, containing something like this, which will append the error message to your normal ‘this is my subject’ subject line:
this is my subject <txp:php>global $googlerror; echo $googlerror;</txp:php>
Offline
#648 2009-07-27 19:02:56
Re: zem_contact_reborn 4.0.3.20
ruud or anyone – can’t seem to get it in the global scope here is the plugin overview:
register_callback(‘my_function’,‘zemcontact.submit’);
function my_function() {//connect to google with un and pw
//provide wrong pw to check error message insert
//if connect to google do insert
//works fine when given correct pw
//fail to connect
$googlerror = “did not connect”;
return $googlerror;
}
Then the form:
<txp:zem_contact to="emailaddress" thanks="Your Form has been submitted thank you for your interest." label="my label" subject_form="subject-google" > rest of form works great with above code whether connection fails or connects
subject form:
<txp:php>global $googlerror; echo $googlerror . " - ";</txp:php>My form went through and mailed
But just get the “-” + subject message in the subject line failed or not, I would add a check here of course to make sure googlerror was defined but I get nothing either way……..I am just not getting it into the global scope, I think any thoughts?
Last edited by cuda (2009-07-27 19:12:51)
Offline
#649 2009-07-27 19:47:57
Re: zem_contact_reborn 4.0.3.20
Try this:
function my_function() {
...
global $googlerror;
$googlerror = 'did not connect';
}
Offline
#650 2009-07-27 21:53:01
Re: zem_contact_reborn 4.0.3.20
ruud tried that, didn’t work, and I think that really just declares $googlerror as a global variable and then just redeclares it as a local variable pretty much doing nothing….hmmmmm ok I think I got it I will go and define a constant:
define('GOOG_ER','Error Inserting');
then do this in the subject form
<txp:php>if (defined('GOOG_ER')){echo GOOG_ER . " - ";}</txp:php> This is my default subject line
Yep that worked….Thanks for the ideas ruud
Offline
#651 2009-07-27 23:31:04
- Rimfya
- Member
- Registered: 2007-11-22
- Posts: 31
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
- no, just plain text emails (HTML email is evil!)
- yes, see the plugin documentation (‘copysender’ attribute on the main zem_contact tag)
1. HTML email is NOT evil!
2. Thanks for the help.
Offline
#652 2009-08-14 19:31:49
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: zem_contact_reborn 4.0.3.20
is there a way to put some text in the “comments” field for users to see before they start inputting their own text?
Offline
#653 2009-08-14 20:01:16
Re: zem_contact_reborn 4.0.3.20
see documentation on using the ‘default’ attribute.
Offline
#654 2009-08-14 20:06:52
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: zem_contact_reborn 4.0.3.20
Not sure how I missed that. Thanks.
As a follow up, would it be possible to use javascript with this plugin? I want to have an effect where the text disappears once the user starts typing.
Offline
#655 2009-08-14 20:09:02
Re: zem_contact_reborn 4.0.3.20
Yes, it’s possible.
Just look at the generated markup and then fine-tune your javascript according.
You may want to take a look at something like jquery labelify
Offline
#656 2009-08-16 16:33:08
Re: zem_contact_reborn 4.0.3.20
I just tried installing this plugin and nothing has appeared under plugins to show that it installed.
I’m getting * Badly formed or empty plugin code.* as an error message.
Never had any issues with plugins before.
doh – must read docs more carefully.
Last edited by stevieg_83 (2009-08-16 16:47:20)
Offline
#657 2009-08-17 16:18:05
Re: zem_contact_reborn 4.0.3.20
Is there any kind of error log with this at all? I’m trying to use but it says Sent and nothing ever shows up on my side so I’ve no idea if it’s working or not.
Offline
#658 2009-08-17 17:29:42
Re: zem_contact_reborn 4.0.3.20
If the plugin detects an error, it shows an error. Check your mail server log files for clues on why the email wasn’t sent.
Offline
#659 2009-09-02 16:01:48
Re: zem_contact_reborn 4.0.3.20
I’m stuck. I’ve got the following in a page form but for some reason submitting the form doesn’ t appear to do anything. It just refreshes the page with the form blanked out.
<h2>We'd love to hear from you..</h2>
<br/>
<txp:zem_contact label="" to="my@email.com">
<txp:zem_contact_text label="Name" break="" /><br />
<txp:zem_contact_email break="" /><br />
<txp:zem_contact_textarea label="Message" break="" /><br />
<txp:zem_contact_checkbox Required="1" /><br/>
<div class="confirmed">Checking the box above indicates that this is not spam.</div><br />
<txp:zem_contact_submit label="Send" />
</txp:zem_contact>
Last edited by ruud (2009-09-02 16:51:36)
Offline
#660 2009-09-02 17:30:54
Re: zem_contact_reborn 4.0.3.20
Hi all,
I’m using ZCR in a new site and have a form for ‘send article’ where the text link is replaced by an icon. So far, so good. However I’m obviously doing something very wrong as clicking on the ‘send article’ button also changes the page article! Here’s the code I’m using –
<a href="?zem_contact_send_article=yes"><img src="/images/39.gif" /></a>
<div class="form">
<txp:zem_contact label="Send article link to a friend" send_article="1">
<txp:zem_contact_email label="Recipient Email" send_article="1" />
<txp:zem_contact_email label="Your Email" />
<txp:zem_contact_submit label="Send Article" />
</txp:zem_contact>
</div>
Apart from some very messy CSS which needs attention, does anyone have any ideas where I’m going wrong?
Offline