Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#277 2007-07-26 04:14:35

simmerdesign
Member
From: Eden Prairie, MN
Registered: 2006-01-03
Posts: 19
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud wrote:

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.

Of course … which is why the only error I get is “Email is not valid” rather than “email is missing.” It sure is easy to overlook the obvious. Thanks very much for your help.

Offline

#278 2007-07-26 19:37:26

werner
Member
Registered: 2006-09-03
Posts: 10

Re: zem_contact_reborn 4.0.3.19 (old version)

tinyfly wrote:

First step is to check with your server admin and see if they can reconfigure PHP without the —enable-sigchild option.

they can’t

$mail = true

had a typo, should be

$mail = true;

now it works perfectly – THANK YOU!

Offline

#279 2007-08-03 00:56:50

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

Re: zem_contact_reborn 4.0.3.19 (old version)

back in March, ruud wrote:

maniqui, the copysender/from thing looks like a bug. If you can confirm that my suggested fix works, it’ll be included in the next version.

Thanks for the fix, Ruud. I didn’t see a follow-up by Julián in the next few pages, but I just tried this myself. The result:

  • The sender gets a copy
  • The designated recipient(s) in the to attribute get a copy
  • The address in the from attribute gets nothing (which is as it should be)

I’d love to see this rolled into a future version, since it makes it easier to use this plugin for much more than just contact forms. Will the fix you provided also work when the from_form attribute is used?

Offline

#280 2007-08-04 20:49:08

rayben
Member
From: Cologne, Germany
Registered: 2004-10-20
Posts: 31

Re: zem_contact_reborn 4.0.3.19 (old version)

I there any possibility to add some js? For instance, I want to make the values of Name, Email & the Textarea disappear if you click on them and appear again if something else is in focus. I know how the script should look like, but I don’t know where to place it.
Did anyone try this before?

Offline

#281 2007-08-04 21:35:39

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

Re: zem_contact_reborn 4.0.3.19 (old version)

Adam, yes that would also work if from_form is used instead of from.

rayben, at the moment the only way is either by hacking the plugin code or by using javascript to add the ‘onclick’ attribute after the page is rendered.

Offline

#282 2007-08-04 22:13:10

rayben
Member
From: Cologne, Germany
Registered: 2004-10-20
Posts: 31

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud wrote:

rayben, at the moment the only way is either by hacking the plugin code or by using javascript to add the ‘onclick’ attribute after the page is rendered.

Thanks for the Quick Reply. It is not that important.

But I got a strange error:

The textarea field seems to validated if there is a proper e-mail address (which means it works only if I put the email in the textarea field) and if it is validated, the email address shows up in all my three input types (name, email & textarea) and I get an email with just the mail address inside :)

My Form looks like this:

<txp:zem_contact to="my[at]emailaddress.de" subject="yada yada" > <txp:zem_contact_text label="" default="Name" /> <txp:zem_contact_email label="" default="Email" /> <txp:zem_contact_textarea label="" default="Put your text here" /> <txp:zem_contact_submit label="send"><img src="../images/29.gif" width="70px" height="19px" alt="send"> </txp:zem_contact_submit> </txp:zem_contact>

Offline

#283 2007-08-04 22:24:58

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

Re: zem_contact_reborn 4.0.3.19 (old version)

Either the name or the label attribute must be set to something unique (and non-empty) for each of the form fields.

Last edited by ruud (2007-08-04 22:25:24)

Offline

#284 2007-08-04 22:29:39

rayben
Member
From: Cologne, Germany
Registered: 2004-10-20
Posts: 31

Re: zem_contact_reborn 4.0.3.19 (old version)

ruud wrote:

Either the name or the label attribute must be set to something unique (and non-empty) for each of the form fields.

Thanks a lot. That saved my Day :)

Offline

#285 2007-08-08 14:55:05

rayben
Member
From: Cologne, Germany
Registered: 2004-10-20
Posts: 31

Re: zem_contact_reborn 4.0.3.19 (old version)

Can you also tell me if I am able to change the email output, so the “name” appears in the email instead of the “label” ?

I mean, only if it is a simple hack…

Offline

#286 2007-08-08 16:25: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.19 (old version)

rayben, assuming you’re setting the labels to an empty string everywhere, you could add $label = $name; after the global line in the zem_contact_store function, but bear in mind that the name is rather limited in what characters it allows (no spaces or accented letters, just alphanumerics and :_- characters)

Last edited by ruud (2007-08-08 16:25:37)

Offline

#287 2007-08-12 14:31:39

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

Re: zem_contact_reborn 4.0.3.19 (old version)

Time to test a new version (.20) that should fix all bugs mentioned in this topic.
No new features, just bug fixes.
If nobody reports problems with this one in the upcoming week, I’ll do an official release next week.
download
download [compressed]

Bugfixes:

  • remove leading and trailing spaces from form input
  • escape label attribute values when showing the form in the browser (not in email, plain text there)
  • remove dependency on zem_contact_submit ‘name’ attribute value for the submit button as this is handled by the zem_contact_form_id nowadays (makes it easier to custom build your own submit button)
  • use ISO-8859-1 instead of ISO-8599-1 (typo!) when override_charset is set in the TXP preferences (by default UTF-8 is used)
  • add some extra email header escaping. Not to fix header injection, but to filter out ASCII NULL
  • use the correct sender email address in the copysender email even if the ‘from’ attribute is set in the zem_contact tag
  • some other HTML escaping fixes
  • make required=“0” attribute work when used in zem_contact_email tag (thanks Federico!)
  • don’t display empty input values in the email
  • use TXP built-in email validation checks instead of duplicating code in plugin

Earlier in this topic I mentioned a new version with a lot of new features, that is still going to happen later this year, but I wanted to get a fixed version out there to fix known bugs without risking regressions.

Last edited by ruud (2007-08-12 14:33:32)

Offline

#288 2007-08-12 15:24:07

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,643
GitHub Twitter

Re: zem_contact_reborn 4.0.3.19 (old version)

Tks ruud!
I’m traying it immediatly.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB