Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#337 2008-05-20 16:01:35

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

The ‘to’ attribute can take a comma separated list of email addresses.

Offline

#338 2008-05-20 17:52:40

Slaktad
Archived Plugin Author
From: Linköping, Sweden
Registered: 2005-06-28
Posts: 50
Website

Re: zem_contact_reborn 4.0.3.20

I’m currently creating a small website for a client that needs a form where it is possible to add input-fields on the fly with javascript. I use zem_contact_reborn to generate and handle the form. In the frontend I let the user to press a “Add field”-link which triggers a javascript to copy some of the existing input fields and then also change the name attribute on the copied fields so that they will be unique.

However I haven’t got it to work. It seems like zem_contact_reborn ignores the copies… so is it possible to use zem_contact_reborn for this task?

Offline

#339 2008-05-20 17:57:36

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

Re: zem_contact_reborn 4.0.3.20

An un-obstrusive approach might be the way to achieve what you want.
Add the fields on the zem_contact_reborn form, and then hide them via javascript.
Then, un-hide them using the “Add field” link.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#340 2008-05-20 18:05:07

Slaktad
Archived Plugin Author
From: Linköping, Sweden
Registered: 2005-06-28
Posts: 50
Website

Re: zem_contact_reborn 4.0.3.20

maniqui wrote:

An un-obstrusive approach might be the way to achieve what you want.
Add the fields on the zem_contact_reborn form, and then hide them via javascript.
Then, un-hide them using the “Add field” link.

Yes, that would be a possible solution (and a quite nice one for non-js users). However it may be a limitation (if the user is in need of more fields) or an unnecessary load for all other users – the form is quite complex and contains a lot of fields – so it would be nice if it is possible to find the “middle way” and let zem_contact_reborn handle js-added fields aswell.

Offline

#341 2008-05-20 18:47:59

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

It’s not possible to add form fields on client-side using Javascript and let zem_contact_reborn handle them. Nor is it something that can be added by hacking the plugin code.

Offline

#342 2008-05-20 18:55:52

Slaktad
Archived Plugin Author
From: Linköping, Sweden
Registered: 2005-06-28
Posts: 50
Website

Re: zem_contact_reborn 4.0.3.20

ruud wrote:

It’s not possible to add form fields on client-side using Javascript and let zem_contact_reborn handle them. Nor is it something that can be added by hacking the plugin code.

Ok, that’s what I suspected. Thanks for the quick reply.

Offline

#343 2008-06-07 09:34:54

LetterHoofd
Member
From: Kortrijk, BE
Registered: 2006-01-20
Posts: 40
Website

Re: zem_contact_reborn 4.0.3.20

I have a question regarding performance. We use the contact form as an order form.

On a specified time ordering will be allowed and a lot of people (estimation: 500) will want to submit the form. Will it cause any problems? Does validation and processing the form create heavy load on the server. My hosting company says they are capable of handling that load, but I wanted to know from the coder.

The form is already available and functional, because people who want to order earlier are allowed to do that, but their order won’t be processed earlier than 2 hours after the official start. (FYI: the same rules apply for people who fill out the paper form.)

I expect people to fill in the form in advance and waiting till the specified time to press the submit button. That is why I changed this line in the code, as I read earlier in this forum post.

safe_insert('txp_discuss_nonce', "issue_time = now() + 55 MINUTE, nonce = '$zem_contact_nonce'");

Offline

#344 2008-06-08 10:45:34

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

Validation doesn’t create a heavy load normally. I suspect most of the time is spent doing the DNS lookup to verify the domain name in the email address. If 500 people submit at the exact same time, the problem won’t be processing power, but RAM, since (depending on your server setup) that could fire up 500 PHP processes at the same time.
I guess it depends on how accurate the clocks of the participants are. If the submissions are spread evenly over 10 seconds, the concurrency level drops considerably.

btw, those 55 minutes will give the visitors 1 hour and 5 minutes to fill out and submit the form.

Offline

#345 2008-06-16 19:27:02

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.20

Rudd, a couple of questions if I may:

1. Is there a way to get the thank you message appear on a different part of a page? I ask because when a form is at the bottom of a page and submitted the thank you message is out of view at the bottom of the page when the page is refreshed.

2. I have a form on an article page and would like a hidden field (or even a text field) to contain the title of the article – is this poss?

Thanks and best wishes
Lee

Last edited by lee (2008-06-16 20:02:52)

Offline

#346 2008-06-16 20:04:44

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

Lee,

  1. doesn’t the #anchor force the page to scroll down to the thank you message?
  2. yes: simply put the <txp:title /> tag inside a zem_contact_secret tag.

Offline

#347 2008-06-16 20:28:09

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.20

You’re right the page does scroll, from memory I thought it didn’t. Be nice if the thank you message could be at the top of the page in the same way error messages can be in a different part of a page. Is this this something you would consider adding?

Offline

#348 2008-06-16 20:59:44

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

The separated errors are something that was done in the past, before the anchor/scroll thing happened. If you want more focus on the thank you message, have you considered redirecting to a separate page designed specifically for that purpose?

Offline

Board footer

Powered by FluxBB