Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Plug-in: zem_contact_reborn

#289 2006-03-04 13:11:26

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Plug-in: zem_contact_reborn

Just giving this a go, but having a two immediate problems. It’s quite possible it’s me, but here it is…

Here’s my mail form Form currently:

<txp:zem_contact to="xxxxx">
<p><txp:zem_contact_text label="Name" /></p>
<p><txp:zem_contact_email /></p>
<p><txp:zem_contact_text label="Web Address" size="50" /></p>
<p><txp:zem_contact_textarea label="Details" /></p>
<txp:zem_contact_submit label="Send" />
</txp:zem_contact>

As you can see, I use the <code>zem_contact_text</code> tag twice, once for “Name” and once for “Web Address”.

My first problem presented itself when I wanted to have “Name” required but not “Web Address”. Realizing that I could not set required in the plugin code without making both fields required, I turned it off in the plugin code and added it just to the “Name” piece like this: <code><txp:zem_contact_text label=“Name” required=“yes” /></code>. However, whenever I tried sending a test message, I would get an error saying I had to add something to the “Name” field, even though I already was.

The second problem revealed itself after I decided to drop the “Name” field as required, and thus the current Form snippet above. Now the message is sent fine, but instead of getting a “Name” field and a “Web Address” field in the delivered email, I get the “Web Address” field — and it’s respective message input — twice, the second instance being where the “Name” information is supposed to be. It seems there is no distinction between different instances of the <code><txp:zem_contact_text /></code> tag, and it simply outputs the information for the latest instance to all locations.

I didn’t have this problem in the old zem_contact, it seemed to make the distinction easily enough. The old zem_contact also allows for multi-word entries in a select control, which I notice soulship is having to fight.

I’ll have to go back to the old zem_contact in the meantime, but any ideas?

Last edited by Destry (2006-03-04 13:14:30)

Offline

#290 2006-03-04 14:05:48

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

I too use 2 “text” fields for the email form I use on “Just Another Theme”. It’s not viewable at the moment as I’m changing the site around a bit but it’s where I test the latest version of the plug-in. This is my code:-

<code>
<div id=“emailform”>
<txp:zem_contact to=“xxxxxxxxxx”>
<p><txp:zem_contact_text label=“Name” size=“40” /></p>
<p><txp:zem_contact_email size=“40” /></p>
<p><txp:zem_contact_text label=“Subject” required=“no” size=“40” /></p>
<p><txp:zem_contact_textarea /></p>
<p><txp:zem_contact_checkbox label=“Must be checked before submitting” /></p>
<p><txp:zem_contact_submit button=“yes” /></p>
<p>Currently testing additions for version .17 of the zem_contact_reborn plug-in including a “button element”.</p>
</txp:zem_contact>
</div></code>
<br />

As you can see my version can do things yours can’t but the use of 2 “text” fields isn’t causing any problems at all.

Anyone else seen this problem or using 2 “text” fields without a problem?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#291 2006-03-04 14:17:24

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Plug-in: zem_contact_reborn

One thing I notice there is you are handling the required instance in reverse fashion; i.e., saying <code>required=“no”</code> instead of “yes”. Maybe the thing I should do here is set the “text” tag as “required” in the plugin code and then override as “no” in the Form where it doesn’t need it. I’ll give it a try and report.

Offline

#292 2006-03-04 14:56:52

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

That’s because “required” is set to “yes” by default in all fields that use it. You should only need to specify those where you require “no”.

And I have the form viewable again. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#293 2006-03-04 15:05:26

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

Re: Plug-in: zem_contact_reborn

lee wrote:

jamiew, as a seperate plugin would be wondeful as there are no other plugins like this.

There is something similar:

Moderation Queue Public Beta by Manfre
Community Driven Textpattern by Manfre

But it seems right now Manfre isnt developing them.
It would be nice to open a new thread in “Organizing Community Contributions” about what can be done to develope some community tools for a TXP installation… I should open it…


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#294 2006-03-04 15:23:37

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Plug-in: zem_contact_reborn

That’s because “required” is set to “yes” by default in all fields that use it. You should only need to specify those where you require “no”.

Right. I understand. But it does work the other way too…you can remove the default “required” and set it locally as “yes”. In fact, the latter approach, as I mentioned earlier, doesn’t give me the false error messages about fields needing input, which I’m guessing is connected with the lack of distinction problem I’m still having, as I note next.

I tried your approach and the result is the same: no distinction between the input content for the two instances of the “text” control. One correction to my earlier post though, the lables “Name” and “Web Address” are correctly shown in the email message, just not the user input, which is the input for “Web Address” in both instances. Strange.

Anyhow, I’ll probably just stick with zem_old. I’ve never had spam problems with zem_old, and what people have been saying lately in this thread makes me nervous to change to anything else yet. How much different are the two, anyway, in terms of security?

Appreciate your dedication on this though.

Last edited by Destry (2006-03-05 11:53:02)

Offline

#295 2006-03-04 16:12:44

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Plug-in: zem_contact_reborn

Stuart,
Cool point about the API. I think I get how that could work now.
“Earth to Matthew, come in, come in, we’re losing you…”
matthew: pulls earwax from ear: (speaks in zoolander voice)
“hello, earth, were you trying to get a hold of me, next time use a contact form, its much more efficient, and there is a new API you can use now.”


Offline

#296 2006-03-04 17:19:12

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Plug-in: zem_contact_reborn

Anyone have any thoughts on my question above about multi-word-entries in a select list? Or is there no work around.

P.S. I am using more than one text field without any problems as well. Both are required and everything seems to be working fine.

Offline

#297 2006-03-04 17:24:10

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Plug-in: zem_contact_reborn

Soulship, I haven’t tried this, but have you tried any character entities for spaces? It might not be great, but it could work until someone changes the PHP stuff?


Offline

#298 2006-03-04 17:34:47

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Plug-in: zem_contact_reborn

Hmmm good thought. I’ll give it a whirl.

EDIT: Yeah the entities don’t get parsed unfortunately. So that won’t work.

Last edited by soulship (2006-03-04 17:47:19)

Offline

#299 2006-03-05 18:19:43

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: Plug-in: zem_contact_reborn

hello, i’m trying to use the contact form TWICE on the same page and fro different purposes. The problem is that the send input triggers both forms, no matter which one you click. what way do I specify an id for the different forms?

thank you


what was that again…?

Offline

#300 2006-03-06 04:38:31

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Plug-in: zem_contact_reborn

Soulship, Yeah I wondered about that. Bummer. Maybe its worth contacting some of the folks who have done PHP work on the plugin individually? I know, like you said, that multiple word select lists worked at one point on the “other version” of the plugin. Seems like a reasonable thing to make work.

Feragnoli,
Are you using the tags in an article, article form, page? what? Have you tried changing that up and seeing if the effect is different? Just an idea?


Offline

  1. Index
  2. » Archives
  3. » Plug-in: zem_contact_reborn

Board footer

Powered by FluxBB