Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2007-11-27 21:05:28

mwillse
Member
From: brooklyn, ny
Registered: 2006-06-26
Posts: 83
Website

Re: zem_contact_reborn 4.0.3.20

Rudd, regarding the thanks confirmation on 4.0.3

It’s working with a redirect. And that’s fine for my purposes.
No need to trouble you with this legacy issue. Thanks for all your work for textpattern!

It wasn’t working with the thanks attribute set or left out for the default. The rest is all standard. No forms or anything:

<txp:zem_contact to="name@address.com" subject="Web Contact" redirect="about/thanks" label="" >
<txp:zem_contact_text label="name" /><br />
<txp:zem_contact_email /><br />
<txp:zem_contact_checkbox label="Sign-up for Newsletter?" required="0" /><br />
<txp:zem_contact_textarea label="comment" required="no" cols="30" rows="3" /><br />
<txp:zem_contact_submit label="send" />
</txp:zem_contact>

Offline

#86 2007-11-29 19:02:26

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

Re: zem_contact_reborn 4.0.3.20

Is there possibility how to use my own values in zem_contact_select? Something like:

<txp:zem_contact_select label=“Department” list=”,Marketing,Sales,Support” value=”,25,45,39” />

I tried to hack plugin and I got my values in HTML, so eg. <option value=“25”>Marketing</option> but on submit appered an error.

Offline

#87 2007-11-29 19:46:55

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: zem_contact_reborn 4.0.3.20

2 beztak
Try to use javascript :)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#88 2007-11-29 19:54:48

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

Re: zem_contact_reborn 4.0.3.20

the_ghost wrote:

Try to use javascript :)

Any idea how to do that?

Offline

#89 2007-11-29 20:01:02

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

Do you want to use “Marketing,Sales,Support” on your website, but use “25,45,39” in the email that is sent?

Offline

#90 2007-11-29 20:04:33

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

Re: zem_contact_reborn 4.0.3.20

ruud wrote:

Do you want to use “Marketing,Sales,Support” on your website, but use “25,45,39” in the email that is sent?

Exactly.

Offline

#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

Board footer

Powered by FluxBB