Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#265 2007-07-05 07:32:32
Re: zem_contact_reborn 4.0.3.19 (old version)
maniqui wrote:
Why the values for the value attribute in radio inputs are those weird numbers?
I’m trying to use the ZCR together with the Postmaster plugin.
I think I just would like the values to be “yes” or “no”.
Is the Postmaster plugin using the $_POST array directly instead of using the $zem_contact_values array?
Offline
#266 2007-07-10 07:13:18
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.19 (old version)
I’m interested in using the ZCR API to develop a companion plugin that stores contact details in a cookie and reads them back out again into the appropriate form fields. I’ve figured out how to grab the data and set the cookie, but I’m not clear on whether the fields can be repopulated through the API. It doesn’t look like it works this way.
Would the repopulation of the fields need to be handled with JavaScript, or is there a server-side way that I’m missing?
Thanks in advance for your help.
Offline
#267 2007-07-10 07:49:06
Re: zem_contact_reborn 4.0.3.19 (old version)
You’d have to do this client-side.
Offline
#268 2007-07-12 02:59:12
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.19 (old version)
ruud wrote:
You’d have to do this client-side.
Thanks for the info.
Another question: Could a plugin using the ZCR API call the zem_contact_secret()
function in a way that allows the value of $thing
to show up in the e-mail message?
Offline
#269 2007-07-12 08:45:45
Re: zem_contact_reborn 4.0.3.19 (old version)
No, but you can use zem_contact_store() for that.
Offline
#270 2007-07-12 16:19:04
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.19 (old version)
So I could also use zem_contact_store()
to remove form labels and values from a message, right?
Edit: From the tests I’ve conducted with zem_contact_store()
, apparently not.
Last edited by Logoleptic (2007-07-12 20:24:38)
Offline
#271 2007-07-14 10:04:10
Re: zem_contact_reborn 4.0.3.19 (old version)
Hi,
In using the “send_article” functionality, how can I customise the email that is sent? For example I want to put some intro text that says something like “ Hi receiver@foo.com, sender@foo.com has sent you this article from http://mywebsite.com:”
Also I want the body to be posted and not just the excerpt.
thanks in advance,
Brianna
Offline
#272 2007-07-15 11:23:47
Re: zem_contact_reborn 4.0.3.19 (old version)
Currently not possible without hacking the plugin code.
Offline
#273 2007-07-25 07:10:17
- werner
- Member
- Registered: 2006-09-03
- Posts: 10
Re: zem_contact_reborn 4.0.3.19 (old version)
tinyfly wrote:
Ruud,
I figured out my problems with the email messages. I have textpattern installed on an Oracle Application Server. Which Oracle recommends configuring php with the —enable-sigchild option. This option makes php always return false for child processes (bug?).
So the plugin’sif (mail($var, $var, $var, $var)){}
test was failing. But that test sends the email first and then if it returns false shows the error message. That is why I was still getting the error message even though I would get the mail.
I can’t reconfigure php without that option so I created a workaround that is acceptable for this particular instance.
could you please describe your workaround? my server has the same problem – sends the mail but returns false.
Offline
#274 2007-07-25 16:14:13
Re: zem_contact_reborn 4.0.3.19 (old version)
I’m having trouble with required fields on this site in progress. The email field shows up as required by default (fine, that’s what I want anyway). Then I’ve also set those three text fields (all input type=“text”) in the right column to be required.
They do get the “zemRequired” class properly applied. However, when submitting the form with empty fields, only the email field appears to get checked. If email is valid, the form submits without requiring those other fields or kicking out an error. What gives?
Page code:
<txp:zem_contact form="form_request" label="" to="redacted@redacted.com" />
relevant form_request form code:
<div class="miniCol">
<fieldset>
<legend>Contact Info</legend>
<txp:zem_contact_email break="" default="Email" name="RequestEmail" size="18" required="1" /><br />
<txp:zem_contact_text break="" label="Phone" default="Phone" name="RequestPhone" size="18" required="0" /><br />
<txp:zem_contact_text break="" label="Fax" default="Fax" name="RequestFax" size="18" required="0" />
</fieldset>
</div>
<div class="miniCol">
<fieldset>
<legend>Property Info</legend>
<txp:zem_contact_text break="" label="Property Manager" default="Property Manager Name" name="RequestManager" size="18" required="1" /><br />
<txp:zem_contact_text break="" label="Property Name" default="Property Name" name="RequestProperty" size="18" required="1" /><br />
<txp:zem_contact_text break="" label="Management Company" default="Management Company" name="RequestMgmtCompany" size="18" required="1" /><br />
</fieldset>
</div>
<div class="miniCol">
<txp:zem_contact_select name="RequestProblem" label="What seems to be the problem?" list="Bulb is burned out,Light is stuck on during the day,I changed a bulb & it still doesn't light,A fixture is broken,Other (please specify)" selected="" />
</div>
<div class="miniCol">
<txp:zem_contact_textarea name="RequestDetails" break="" label="Additional Details" cols="16" rows="4" required="0" />
<txp:zem_contact_submit label="Send Your Request" />
</div>
Offline
#275 2007-07-25 21:17:36
Re: zem_contact_reborn 4.0.3.19 (old version)
David, I can’t reproduce it when using just that form code.
I suspect the ‘default’ form values get submitted due to the javascript you’ve added, which restores the default values in the input fields when they’re empty.
Last edited by ruud (2007-07-25 21:17:59)
Offline
#276 2007-07-26 02:53:37
Re: zem_contact_reborn 4.0.3.19 (old version)
werner wrote:
could you please describe your workaround? my server has the same problem – sends the mail but returns false.
First step is to check with your server admin and see if they can reconfigure PHP without the —enable-sigchild option. If and only if they cannot then use the code below. My workaround is a fix in only the loosest sense. I basically made the mail test always return true. Here is how:
Around line 230 in the zem_contact_reborn plugin find the following bit of code:
if (mail($to, $subject, $msg, $headers))
{
$_POST = array();
And change it to this:
$mail = true
if ($mail)
{
mail($to, $subject, $msg, $headers);
$_POST = array();
The original code runs the mail function then returns true or false which in our case will alway return false so the code in the if statement is never run. In my mod I set a variable to always be true (a hack to be sure) then put that as the test for the if statement. Since this is always true it goes inside and runs the mail function and the rest of the code.
Refresh Dallas and other Refreshing Cities.
Offline