Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#661 2009-09-02 18:10:09

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

Can you switch your website to ‘debug’ mode (in the admin preferences) and provide an URL to the form?

Offline

#662 2009-09-02 18:16:40

cmscritic
Member
From: Edmonton, Alberta, Canada
Registered: 2009-07-09
Posts: 29
Website

Re: zem_contact_reborn 4.0.3.20

I have switched to debug mode. The form is at http://www.thatcriticguy.com/contact/

Offline

#663 2009-09-02 18:17:20

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: zem_contact_reborn 4.0.3.20

Hi Ruud,

Thanks for your help. I’ve switched to ‘debugging’, here’s a link to the form as it appears in one of the articles. Let me know if you need anything else.

Offline

#664 2009-09-02 18:19:26

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

decoderltd: you’re loading a random article on that page. When you click the send_article link, it simply loads a new article. Try using the form on an individual article page. You could still link from a section page as you do now, but link the ?zem_contact_send_article=yes part to the individual article page.

Offline

#665 2009-09-02 18:29: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.20

Mike, try adding the following just above the zem_contact tags in the template:

<pre><txp:php>var_dump($_POST);</txp:php></pre>

Then submit a form. You should see extra information showing up on the screen above the form. What does it show?
Which plugins do you have installed (could you post your diagnostics)?

Offline

#666 2009-09-02 18:30:29

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: zem_contact_reborn 4.0.3.20

Thanks Rudd, that all makes perfect sense now. At the moment most pages are rendered using a single form that displays content according to section, etc – what’s the best way of getting ?zem_contact_send_article=yes onto individual article pages?

Offline

#667 2009-09-02 18:42:03

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

decoderltd: No need for that. You just have to add something like this where you currently have your form: <txp:permlink />?zem_contact_send_article=yes
That way, if people click the icon for sending the article, they’re redirected to the individual article page where the form already shows up due to the added query string.

Offline

#668 2009-09-02 18:44:46

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: zem_contact_reborn 4.0.3.20

Great, thanks again Ruud, that’s pointed me in the right direction.

Offline

#669 2009-09-03 15:24:12

mfos
Member
Registered: 2008-12-11
Posts: 34

Re: zem_contact_reborn 4.0.3.20

Hi,

1. I have a Zem form being used as a simple contact form. I would like to use another form, a feedback form elsewhere on the site, but need to alter the css for the form. It needs to be different than that used for the contact form.
How can you set it to use a different class on the HTML form?

2. Also, I am having trouble injecting injecting a value into the ‘value’ option in the secret tag like this
value=”<txp:ign_user_info type=“name” />”
This should add the name of the logged in user to the value field, but it doesn’t seem to be doing it. Just comes out as blank. Any ideas?

Thanks
Mike

Offline

#670 2009-09-03 15:44:47

springworks
Member
Registered: 2005-01-06
Posts: 172
Website

Re: zem_contact_reborn 4.0.3.20

mfos wrote:

1. I have a Zem form being used as a simple contact form. I would like to use another form, a feedback form elsewhere on the site, but need to alter the css for the form. It needs to be different than that used for the contact form.
How can you set it to use a different class on the HTML form?

You could use an id on the body tag of the page, perhaps set to the TXP section using this code: <body id="<txp:section />">

Then you can target the form on each page by using the body id selector to identify which page you are on.

2. Also, I am having trouble injecting injecting a value into the ‘value’ option in the secret tag like this
value=”<txp:ign_user_info type=“name” />”
This should add the name of the logged in user to the value field, but it doesn’t seem to be doing it. Just comes out as blank. Any ideas?

Try using single quotes for the inner pair like this: value="<txp:ign_user_info type='name' />"

[Ruud: no, that wouldn’t work, but you can do it the other way around: single quotes around the txp:ign tag and double quotes around “name”, so the attribute value is parsed. See also my post below for another alternative]

Last edited by ruud (2009-09-03 17:03:01)

Offline

#671 2009-09-03 17:00:15

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

mfos wrote:

1. I have a Zem form being used as a simple contact form. I would like to use another form, a feedback form elsewhere on the site, but need to alter the css for the form. It needs to be different than that used for the contact form.
How can you set it to use a different class on the HTML form?

I’d put the entire form inside a <div class=“otherform”> and use that to override the default form style.

2. Also, I am having trouble injecting injecting a value into the ‘value’ option in the secret tag like this
value=”<txp:ign_user_info type=“name” />”
This should add the name of the logged in user to the value field, but it doesn’t seem to be doing it. Just comes out as blank. Any ideas?

You can use it as a container tag:

<txp:zem_contact_secret label="foo"><txp:ign_user_info type="name" /></txp:zem_contact_secret>

Offline

#672 2009-09-04 09:49:37

mfos
Member
Registered: 2008-12-11
Posts: 34

Re: zem_contact_reborn 4.0.3.20

Thanks very much for your reply.

Managed to get the secret tag working, however the feedback form doesn’t seem to want to accept the div class i have wrapped around it.

This is what I have:

<div style="float:left; margin:0; display:inline; width:200px;">
<txp:zem_contact_submit>Send question</txp:zem_contact_submit>
</div>

Do i need to wrap my original contact form in a div too?

Cheers
Mike

Offline

Board footer

Powered by FluxBB