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

#649 2007-01-14 20:39:14

luthier
Member
Registered: 2004-12-07
Posts: 16

Re: Plug-in: zem_contact_reborn

ruud, thanks for the quick response. Yes, that did it. Unfortunately, that was the main thing I was hoping to utilize in the form since my form spam has gotten pretty bad. I just don’t understand why it works on the one site and not this one. Both are using the latest official release of TXP. And I don’t use the feature in my browser that fills out forms.

Offline

#650 2007-01-14 22:34:56

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

Re: Plug-in: zem_contact_reborn

luthier, try testing with a different browser, preferably installed fresh. It really can’t be anything but a form field that’s already filled out. What pap_contact_cleaner does is add two hidden form fields with names like ‘email’ and ‘phone’. Since these are common names, some browsers try to fill them out. You can try changing these names by editing the pap_contact_cleaner plugin. Perhaps that’ll solve your problem.

Offline

#651 2007-01-19 00:55:41

fbox
Member
From: Melbourne
Registered: 2006-02-18
Posts: 42

Re: Plug-in: zem_contact_reborn

Hi all,

Does anyone know what happened to the suggestion to include functionality that allows a site visitor to select the “to:” address from a drop down menu? i.e. Multiple target email addresses selected by the user with a drop-down select box – sending to fred or jane from the one form.

It was mentioned at the beginning of the community response (late December 2005) to the plugin request for redeveloping zem_contact for money and has dipped in and out of discussion in a number of topics since then. Aslsw66, creativesplash and mary (amongst others) did get some test code working but it doesn’t seem to have been taken further, and links to source code are broken. Perhaps I’m just not finding it in the reams of posts?

It’s potentially a very useful bit of functionality so it’s a pity it seems to have fallen through the cracks.

- Luke

Offline

#652 2007-01-19 01:09:08

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

Re: Plug-in: zem_contact_reborn

Here you go: (directly from help from Rudd)

A dropdown to: list for multiple addresses

Your Form Code

<txp:php>
  global $zem_contact_form;
  switch($zem_contact_form['Deliver To']) {
  	case 'General Inquiries': echo 'ashultz@email.org'; break;
  	case 'AnnMarie Schultz (Admin)': echo 'aschultz@email.org'; break;
  	case 'Geoff Bradford (Lead Pastor)': echo 'gbradford@email.org'; break;
  	case 'Steve Huber (Pastor of Church planting)': echo 'steve@email.org'; break;
    case 'Steve Lutz (Pastor of Campus Ministry)': echo 'lutz@email.org'; break;
    case 'Dave Braud (Director of Music and Arts)': echo 'dave@email.org'; break;
    default: echo 'aschultz@email.org';
  }
</txp:php>

Your Article or page code (note, if you apply this to an article, you will need to add the perfunctory “ “ (space) before your div elements.

<div class="contact">
<txp:zem_contact to_form="contact_to_form" thanks_form="contact_thanks" >
<p><txp:zem_contact_select name="select" label="Deliver To" selected="General Inquiries" list="General Inquiries, AnnMarie Schultz (Admin), Geoff Bradford (Lead Pastor), Steve Huber (Pastor of Church planting), Steve Lutz (Pastor of Campus Ministry), Dave Braud (Director of Music and Arts)" break="" /></p>
<p><txp:zem_contact_text name="name" label="Your Name" break="" /></p>
<p><txp:zem_contact_email  name="email" label="Your Email" break="" /></p>
<p><txp:zem_contact_textarea  name="message" label="Message" break="" /></p>
<p><txp:zem_contact_submit name="submit" label="Send" break="" /></p>
</txp:zem_contact>
 </div>

Which produces the effect here

Last edited by ma_smith (2007-01-19 01:09:33)


Offline

#653 2007-01-22 15:42:57

fbox
Member
From: Melbourne
Registered: 2006-02-18
Posts: 42

Re: Plug-in: zem_contact_reborn

Muchly appreciated, Ma and Rudd. This will be very helpful. =)

Just a note: TXP won’t recognise the <txp:zem_contact_submit /> tag unless the name="submit" and break="" are removed from the submit button line.

Offline

#654 2007-01-22 15:53:54

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

Re: Plug-in: zem_contact_reborn

fbox,
That’s not been a problem for me?


Offline

#655 2007-01-22 16:08:38

fbox
Member
From: Melbourne
Registered: 2006-02-18
Posts: 42

Re: Plug-in: zem_contact_reborn

My apologies, Ma. With further investigation, this was just because “production status” in my admin preferences was still set to the default “testing”, not “live”. Functionality isn’t affected, it’s just a valid code thing prompting an error message.

Offline

#656 2007-01-28 16:46:47

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Plug-in: zem_contact_reborn

Hi all,
is there any way to use the values of specific input boxes in a little bit of javascript. I need to run a calculation on the contents of a couple of textboxes before they are beeng sent. My problem is that I do not know how to tell the textbox to pass its value to a javascript function. In plain htm it should look something like this:
<input name=InputRow1 size=10 maxlength=3 align=“right” LANGUAGE=javascript onchange=“return IsNumeric(InputRow1)” value=0>

Thanks,dl33

Offline

#657 2007-01-28 16:52:03

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

Re: Plug-in: zem_contact_reborn

You’d have to write a separate bit of javascript that modifies the form elements and adds the onchange attribute. The language attribute does not belong there.

Offline

#658 2007-01-28 17:19:24

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Plug-in: zem_contact_reborn

Can you tell me how to do this? Or is there a simpler way of making the plugin accept a onchange javascript event… Is there a way to hack the plugin?

Last edited by dl33 (2007-01-28 17:22:26)

Offline

#659 2007-01-28 17:52:29

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

Re: Plug-in: zem_contact_reborn

Any plugin can be edited/modified (see admin -> plugins tab).

Offline

#660 2007-02-27 12:28:34

beztak
Member
From: Czech Republic
Registered: 2005-07-21
Posts: 184
Website

Re: Plug-in: zem_contact_reborn

It’s possible to use some of the input e.g.

<txp:zem_contact_text label=“subject” required=“yes” break=”“ />

as a subject of email? So every email would have another subject according to this input…

Offline

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

Board footer

Powered by FluxBB