Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#397 2006-03-27 20:32:49
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: Plug-in: zem_contact_reborn
maniqui, you are correct that I am putting the contact form tags inside an article and calling it with <code>txp:article</code>. I did this so that the client could easily edit the options from within the Articles tab, and because this form needs to appear in the automatically generated list of articles in a specific section (for submenu navigation).
It sounds like you’re saying each zem form has to be in its own section, since the form has to be called from the page template itself. Is there no way a zem form can reside peacefully alongside other articles in a section?
Offline
#398 2006-03-27 20:34:23
Re: Plug-in: zem_contact_reborn
Glad you like the radios alannie. That is an unusual way of calling the contact form assuming you have it as an article. As manique suggests, the normal method would be to create a form template containing all your tags then call it directly to your page template with the tag he is showing. The other method is how I prefer it myself. I include the <code><txp:zem_contact /></code> tag in my form template like so:-
<code>
<div id=“emailform”>
<txp:zem_contact to=“me@someonessite.com” copysender=“yes”>
<p><txp:zem_contact_text label=“Name” size=“30” /></p>
<p><txp:zem_contact_email size=“30” /></p>
<p><txp:zem_contact_text label=“Subject” required=“no” size=“30” /></p>
<p><txp:zem_contact_textarea /></p>
<p>What coding experience do you have?</p>
<p class=“additions”><txp:zem_contact_select label=“CSS: “ list=”,None,Okay,Guru” /><txp:zem_contact_select label=“HTML: “ list=”,None,Okay,Guru” /><txp:zem_contact_select label=“PHP: “ list=”,None,Okay,Guru” /></p>
<p>What do you think of the site?</p>
<p><txp:zem_contact_radio name=“Site” label=“Bad” /> <txp:zem_contact_radio name=“Site” label=“OK” /> <txp:zem_contact_radio name=“Site” label=“Good” /></p>
<p>Have you found it useful?</p>
<p><txp:zem_contact_radio name=“Useful” label=“Yes” /> <txp:zem_contact_radio name=“Useful” label=“No” /></p>
<p><txp:zem_contact_submit button=“yes” /></p>
</txp:zem_contact>
</div> <!— close emailform —></code>
<br />
which is a copy of the form I use here so it has a few “bells and whistles” attached. This form is called “email” would you believe and because the <code><txp:zem_contact /></code> tag is included in it (which means the form is complete and self-contained) I can now call the form to the page template using <code><txp:output_form name=“email” /></code>. I just prefer it this way.
You could still call it to a specific section by surrounding the tag with <code><txp:if_section></code> tags.
Last edited by thebombsite (2006-03-27 20:38:42)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#399 2006-03-27 20:48:03
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: Plug-in: zem_contact_reborn
Thanks, Stuart. My setup is like yours, except I have the zem form tags in an article. And with Textile sprinkled throughout. :(
I am starting to wonder if I overlooked something obvious in the instructions for using this plugin, because I just assumed it was something that could be input directly into articles. Putting forms directly into articles certainly seems like a more intuitive setup to me.
I have the same problem with the TextBook documentation – it’s difficult for me to understand whether a tag can/should be used in a form, a page template, or an article. Have I just failed to grasp some embarrassingly basic Textpattern concept, like “never use txp tags in articles?”
Last edited by alannie (2006-03-27 20:48:53)
Offline
#400 2006-03-27 21:12:08
Re: Plug-in: zem_contact_reborn
Well I’m sure there are certain tags that work OK in articles but like you I’m never sure which so I basically try and avoid it. It is something that maybe Destry could have a look at from an information point-of-view over on TextBook.
Is your client not capable of editing a form? I wouldn’t have thought it any more difficult than editing the article and he/she wouldn’t have to search for the article, so maybe it’s easier. Or don’t they have the appropriate permissions?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#401 2006-03-27 21:31:10
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: Plug-in: zem_contact_reborn
Most of the clients I work with have no clue when it comes to HTML or CSS, much less the difference between Textpattern articles, forms, and page templates, etc. We’re talking administrative-assistant types of people who freeze in terror at the mere sight of HTML. Even Textile scares them at first.
For those clients I try to set things up so that the only tabs they’ll ever need to access are the content tabs and they won’t need to learn anything beyond Textile. I had hoped that I could set up the contact form so that they could at least edit the content surrounding it, even if the contact form itself scares them. I don’t really see an easy way to do that here, though, other than leaving the zem form inside an article and simply turning off error reporting (with the appropriate fields still being highlighted when there’s an error).
Thanks for your help in clarifying how the zem form was intended to be set up, and I’ll certainly set it up differently next time!
Offline
#402 2006-03-27 21:38:04
Re: Plug-in: zem_contact_reborn
Well I’m sure there’s a way around it but I would need to know more about what it is that surrounds the dreaded form. :)
For example I know you can use “output_form” in the article form template itself, so maybe you could use the “override form” function in the “Advanced options” to use a special article form for the job. They wouldn’t even have to see the form code then. ;)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#403 2006-03-27 22:25:42
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: Plug-in: zem_contact_reborn
thebombsite wrote:
For example I know you can use “output_form” in the article form template itself, so maybe you could use the “override form” function in the “Advanced options” to use a special article form for the job. They wouldn’t even have to see the form code then. ;)
Stuart, this did the trick! I dumped the default article tags and zem form tags into a new article form, and then specified the new article form in the “override form” function on the page for the article where I wanted the form to appear. The error messages are now appearing just once instead of twice. That solves my problem of how to make the page article containing the zem form appear with other non-form pages articles in a section. Thank you thank you!!
Edit: just a small change to ensure future visitors aren’t confused about what exactly I did. Gotta keep my Textpattern terminology in line!
Last edited by alannie (2006-03-28 18:28:31)
Offline
#404 2006-03-28 16:06:28
Re: Plug-in: zem_contact_reborn
Ooo. Another happy customer. Anyone else? Quickly now. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#405 2006-03-28 16:06:34
Re: Plug-in: zem_contact_reborn
I have everything working properly, except when I try to use the line below I get “we do not accept spam”.
It only seems to return as spam when I use numbers. Any ideas?
<code><txp:zem_contact_text label=“phone” min=7 /></code>
Thanks.
Tom
Offline
#406 2006-03-28 16:08:31
Re: Plug-in: zem_contact_reborn
Actually I have the feeling that the “label=phone” is conflicting with the pap_contact_cleaner plug-in so can you modify the label, maybe make it “telephone” or maybe “Phone”?
Last edited by thebombsite (2006-03-28 16:09:46)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#407 2006-03-28 16:23:46
Re: Plug-in: zem_contact_reborn
Bingo! That was it…I changed the label to “telephone” and it works fine.
Thanks so much for the quick response!
Offline
#408 2006-03-30 11:52:15
Re: Plug-in: zem_contact_reborn
Hi Stuart,
I see a small bug with ZCR .17 (I have the latest versions of all 3 plugins, and all active).
I entered an incorrect email i.e me@mypost.co and the form was submitted (into space obviously!). Then with me@mypost. and that did not go – the error message came up as expected. Finally, with me@mypost.c – the form was submitted.
So, looks like the form only for something after the “.”
Maybe its just me ;-)
Offline