Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#391 2008-08-19 22:58:04

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: zem_contact_reborn 4.0.3.20

dreamer wrote:

Why do I get this error message when filling out the form?

The “missing” messages appear when a required field isn’t filled in. Remember that fields are required by default, and making them optional requires setting the “required” attribute to 0:

<txp:zem_contact_text label="Home Phone" name="h-phone" required="0" />

The “already submitted” error has to do with the way ZCR uses nonces to fight spam. If you’re using zem_contact_reborn together with asy_jpcache, use this compatibility plugin as well to avoid the “already submitted” error. Be sure to follow all the compatibility plugin’s instructions, including the edits to the jpcache-config.php file. Doing so will also prevent “form expired” errors from showing up.

If you’re not using asy_jpcache (or any other static page caching), then you may have some other kind of problem. If you can give us some more details about your Textpattern setup, we may be able to provide better help.

Offline

#392 2008-08-19 23:14:01

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: zem_contact_reborn 4.0.3.20

hi Adam,

being that I’ve done some freelance work for dreamer, I can give more details on this issue:

dreamer asked me if I would know why emails sent using zem_contact_reborn won’t work if the “to” attribute (on <txp:zem_contact /> tag) was filled with an address belonging to the same domain the site is hosted.
Because I’m pretty sure I’ve read this issue before, I did a search to find out if there was a fix/workaround to it.
I’ve found this post on this same thread.

Then, I tried that solution, but because it didn’t seem to work, I reverted back the applied changes, first, by un-doing the change in the code.
But then, by re-installing zem_contact_reborn again.

After that, it comes the issue dreamer posted: the contact form started to display the error/expired messages always.

1. Could it something like a “cached forever” nonce? (or something similar, like nonces nor being generated properly)
2. Could it be related to the fact that the contact form is being called from inside a TXP article?

AFAIK, asy_jpcache isn’t being used on dreamer’s site.

BTW, Adam, does this “compatibility issue” between zem_contact_reborn and asy_jpcache affect every site that has both of them installed? or it just happens just in some sites?

Last edited by maniqui (2008-08-19 23:14:41)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#393 2008-08-20 07:46:17

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

ZCR uses nonces the same way as the TXP commenting system, so chances of anything going wrong on the DB side are very low.

If you look at the HTML source of the page containing the form, does the nonce change each time you refresh the page using CTRL+F5?
The fact that the other form fields are reported as empty is a result of using a nonce that has already been used before.

Offline

#394 2008-08-22 16:58:19

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

Re: zem_contact_reborn 4.0.3.20

Hi there,

i like to achieve the following but don´t know if it is possible at all? :
i use a ZCR form as an odering form for some PDF´s. On frontpage are two links pointing to the ZCR form. Now when you hit link A checkbox A should be checked. When you hit link B checkbox B should be checked an A unchecked.

I guess i could use javascript but for that again i need a from name and checkbox name. But i can not assign a form name.

Any solutions around ? PHP? ..?

Offline

#395 2008-08-22 17:12:56

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: zem_contact_reborn 4.0.3.20

It turns out that the client’s email address was still hosted on their domain registrar (godaddy) instead of their webhosting company. Once he switched over to the webhosting email provider, the error forms no longer appeared.

Having said that, I do have a couple of follow ups;

-When putting the wrong number of numbers in the “phone” field, the warning said it must contain at least 7 numbers, but it printed that warning twice. How to get rid of the double warnings and just one warning?

- Also, whenever I fill out the form and hit submit, it sends two copies instead of one to the email address of record.

Offline

#396 2008-08-22 17:45:36

dreamer
Member
Registered: 2007-06-08
Posts: 242

Re: zem_contact_reborn 4.0.3.20

issue fixed.

it seems that i had both my article and my form outputting email addresses. when in fact, i should’ve just used 1 email address for the article and leave that out for the form itself. i interpreted the documentation on the plugin incorrectly.

If i can make a suggestion for future reference on the documention. Where it says, “Getting Started”, might be easier to clarify not to put the email address in both the article and the form. At least, that’s how I read it.

Offline

#397 2008-08-22 18:06:15

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: zem_contact_reborn 4.0.3.20

alexandra wrote:

On frontpage are two links pointing to the ZCR form. Now when you hit link A checkbox A should be checked. When you hit link B checkbox B should be checked an A unchecked.

Hi alexandra,

you could probably achieve what you want using one of this plugins: chs_if_urlvar, or smd_if plugin.
Both can be used for the same solution: passing a variable through the URL (that is, on your frontpage links), and then execute some conditional code inside your zem_contact form.
Like this (pseudo code):

if url var = A value = 1
       zem_contact_checkbox name="A" checked="1"
       zem_contact_checkbox name="B" checked="0"

if url var = B value = 1
       zem_contact_checkbox name="A" checked="0"
       zem_contact_checkbox name="B" checked="1"

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#398 2008-08-23 02:16:04

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: zem_contact_reborn 4.0.3.20

uli wrote:

For #1: have a look at the DOM of any Google search form (extract here) or, if you prefer jQuery, see Bloke’s reply below.

Thanks for that Uli.

The main next challenge for me as a none coder was the fact that <txp:zem_contact /> doesn’t have a “name” attribute, so targeting the form does not seem possible without hacking the plugin.

After trial and error, I found that I could add name="zemContactForm" just after class="zemContactForm" round about line 286.

Rudd, I hope that’s okay?

Offline

#399 2008-08-23 09:49:40

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

Sure, that’ll work fine as long as you have only one form on the page.

Offline

#400 2008-08-23 22:46:57

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: zem_contact_reborn 4.0.3.20

Thanks Rudd.
Out of curiosity, why doesn’t the form have a “name” attribute?

Offline

#401 2008-08-24 08:44:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.20

No specific reason. As I understand it you can reference forms by name, but also by number.

Offline

#402 2008-08-25 01:11:29

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: zem_contact_reborn 4.0.3.20

possible to augment zem_contact_reborn functionality to allow user to upload up to 5 images along with the response form?

or is a different solution a better path to follow?

(I saw a plugin that offered file uploads but doesn’t appear to be available any more.)

Offline

#403 2008-08-25 06:17:39

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,394
Website GitHub Mastodon Twitter

Re: zem_contact_reborn 4.0.3.20

nardo wrote:

(I saw a plugin that offered file uploads but doesn’t appear to be available any more.)

Hi nardo. Anonymous File Upload is available on request

Last edited by colak (2008-08-25 06:18:22)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#404 2008-08-28 00:48:30

weber
New Member
Registered: 2008-06-08
Posts: 8

Re: zem_contact_reborn 4.0.3.20

Hi all!

I’d like to use a custom field containing an email address to define the “to” attribute for zem_contact_reborn, something like:

<txp:zem_contact to='<txp:custom_field name="Email" />' subject="Enquiry from web site" label="">

Even after searching the forum and reading the info on TXP’s tag parsing , it still doesn’t seem to work, so I tried something based on something I’ve seen Mary and Ruud do before, like:

<txp:php> global $zem_contact_form; echo zem_contact(array('to'=> custom_field(array('name' => 'email')), 'subject'=>'Enquiry from web site', 'label'=>'' )); </txp:php>

I’m not a PHP coder, and the above is so obviously wrong, but you may perhaps get an idea of what I was trying to do.

Is anyone able to give me some tips?

Offline

#405 2008-08-28 05:13:36

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: zem_contact_reborn 4.0.3.20

weber wrote:

Is anyone able to give me some tips?

Hello weber. Not sure if I can help much but here are a few things…

  1. You are running on the latest svn version of Txp right?
  2. You have different capitalizations for the ‘Email’ / ‘email’ string in your examples. What is your custom field actually called?

Steve

Offline

Board footer

Powered by FluxBB