Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2007-11-29 21:18:07

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

Try replacing this:

        'list'        => zem_contact_gTxt('general_inquiry'),
[...]
$list = array_map('trim', split($delimiter, preg_replace('/[\r\n\t\s]+/', ' ',$list)));
[...]
            if (in_array($value, $list))
            {
                zem_contact_store($name, $label, $value);
            }

with:

       'list'        => zem_contact_gTxt('general_inquiry'),
       'values'      => '',
[...]
$list = array_map('trim', split($delimiter, preg_replace('/[\r\n\t\s]+/', ' ',$list)));
$values = array_map('trim', split($delimiter, preg_replace('/[\r\n\t\s]+/', ' ',$values)));
[...]
            if (in_array($value, $list))
            {
              $flip = array_flip($list);
              zem_contact_store($name, $label, ($values ? $values[$flip[$value]] : $value));
            }

Last edited by ruud (2007-11-29 21:18:28)

Offline

#92 2007-11-29 21:18:24

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

Re: zem_contact_reborn 4.0.3.20

the_ghost wrote:

Try to use javascript :)

Using JavaScript to modify the form markup might work for those with JavaScript enabled, but anyone else would still get a message with the department names in it.

Many mobile browsers have poor or missing JS support, and there are still some IT departments that block JS with a firewall for security reasons. You just can’t count on it.

@Ruud: What Jirka is trying to accomplish would be an awesome feature for a future release. :-)

Last edited by Logoleptic (2007-11-29 21:21:01)

Offline

#93 2007-11-29 21:28:15

EddieG5
Member
From: Georgia
Registered: 2004-03-03
Posts: 96

Re: zem_contact_reborn 4.0.3.20

Would I be able to use this plugin to power an HTML form? For example, Wufoo has templates that you can download ( See example here ) … how would I go about handling this form?

Offline

#94 2007-11-29 21:34:29

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: zem_contact_reborn 4.0.3.20

EddieG5 wrote:

Would I be able to use this plugin to power an HTML form?

yes. that is what the plugin does. you can style your form any way you want. read the documentation.

Last edited by iblastoff (2007-11-29 21:34:48)

Offline

#95 2007-11-29 21:41:59

EddieG5
Member
From: Georgia
Registered: 2004-03-03
Posts: 96

Re: zem_contact_reborn 4.0.3.20

Um, okay. I did read the documentation and it doesn’t seem that this is the case. I was asking if I have an existing HTML form, is there a way I can use this plugin to easily power that form … it looks like I can use this plugin and style that any way I want, but I won’t be able to use a form that has already been written and was using a cgi script to power it.

Offline

#96 2007-11-29 21:58:35

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

Re: zem_contact_reborn 4.0.3.20

ruud wrote:

Try replacing this…

Thanks, I will try it. This pieces of code I made by myself but in the last line I have got an error.

Offline

#97 2007-11-29 22:00:04

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 fact that the HTML form itself is generated through this plugin is essential to make the plugin work. Having said that, it’s pretty flexible in letting you style the form, so I don’t see any reason why creating the form you referred to would pose a problem.

Offline

#98 2007-11-29 22:01:51

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

Re: zem_contact_reborn 4.0.3.20

EddieG5 wrote:

Um, okay. I did read the documentation and it doesn’t seem that this is the case. I was asking if I have an existing HTML form, is there a way I can use this plugin to easily power that form … it looks like I can use this plugin and style that any way I want, but I won’t be able to use a form that has already been written and was using a cgi script to power it.

You can use the existing form as a guide for re-creating that form with this plugin’s template tags. You can’t use the plugin without using the tags, however. There’s no way to simply take your current form and have it processed by zem_contact_reborn.

Edit: Looks like Ruud beat me to the punch.

Last edited by Logoleptic (2007-11-29 22:02:28)

Offline

#99 2007-11-29 22:56:25

EddieG5
Member
From: Georgia
Registered: 2004-03-03
Posts: 96

Re: zem_contact_reborn 4.0.3.20

Excellent … that makes sense and I appreciate the responses!

Offline

#100 2007-11-30 05:43:39

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: zem_contact_reborn 4.0.3.20

I’m sorry if this has been asked before, I already did extensive search for an answer but the thread is very long and search functionality on these forums is poor in a way.

Does this plug-in allows multiple recipients? Something like:

<txp:zem_contact to="recipient1@example.com, recipient2@example.com, recipient3@example.com" />

Last edited by simsim (2007-11-30 05:44:38)

Offline

#101 2007-11-30 05:58:09

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,421
Website GitHub Mastodon

Re: zem_contact_reborn 4.0.3.20

simsim wrote:

Does this plug-in allows multiple recipients?

Yes.

Offline

#102 2007-11-30 06:12:55

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: zem_contact_reborn 4.0.3.20

That’s kind of ironic as I was reading just below that & never noticed it! Thanks.

How one could use this in a “Send Article” form where a user may send the article to one or more recipients? The documentation says the to attribute is required, which is common sense when there’s only one email address. However, in a typical “Send Article” or “Refer A Friend” form with multiple recipients only a first email is mandatory and all other email fields must be optional.

Last edited by simsim (2007-11-30 06:13:13)

Offline

#103 2007-11-30 07:11:48

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

Re: zem_contact_reborn 4.0.3.20

simsim wrote:

How one could use this in a “Send Article” form where a user may send the article to one or more recipients?

postmaster
.

Last edited by colak (2007-11-30 07:12:56)


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

Offline

#104 2007-11-30 09:39:00

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

Re: zem_contact_reborn 4.0.3.20

One another project I have following problem. Select menu is created in PHP (not plugin), I have there onchange javascript function that takes values from OPTIONs, split them (price|measure|title) and insert into one input and one hidden (display:none) input. Problem is that when I modified plugin to accept <txp:zem_contact_text disabled="1" /> because I dont want to user can change price. When input have got disabled=“disabled”, value inserted by javascript is not sent. Hope you understand, my english is terrible.

Here is it: Pila Brantice

Offline

#105 2007-11-30 09:46:08

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

That is the correct behaviour, so if you do want the input sent, use readonly="readonly" instead of disabled="disabled"… but you’d still have to verify server-side that the price is correct, because users can circumvent the readonly/disabled attributes.

Offline

Board footer

Powered by FluxBB