Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#391 2006-03-24 10:01:13
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: Plug-in: zem_contact_reborn
Hello,
Thank you for your answer.
Im now using this plugin for my site.
But now i want to make a custom layout for the form.
My html looks like this :
<code>
<div id=“content”>
<h3>Hier kunt u uw opmerkingen/vragen aan mij mailen</h3>
<form method=“post” id=“zemContactForm” action=”/contact”>
<fieldset>
<legend>Contact</legend>
<input type=“hidden” name=“zem_contact_nonce” value=“d3835aeecafd91570c9c858a9e03a30f” /><br />
<label for=“uwnaam” class=” uwnaam”> Uw naam</label><br /><input type=“text” id=“uwnaam” class=”“ name=“uwnaam” value=”“ maxlength=“100” /><br /><br />
<label for=“uwemailadres” class=” uwemailadres”>Uw email adres</label><br /><input type=“text” id=“uwemailadres” class=”“ name=“uwemailadres” value=”“ maxlength=“100” /><br /><br />
<label for=“uwbericht” class=” uwbericht”>Uw bericht</label><br /><textarea id=“uwbericht” class=”“ name=“uwbericht” cols=“58” rows=“8”></textarea><br /><br />
<input type=“submit” id=“zemSubmit” name=“zem_contact_submit” value=“verzenden” />
</fieldset><div style=“visibility: hidden”><input type=“text” name=“phone” value=”“ id=“phone” /><br /><input type=“text” name=“mail” value=”“ id=“mail” /></div>
</form>
</div>
</code>
- html #commentinput {
position:relative;
float:left;
top:10px;
}
#txpCommentInputForm { }
#commentinput label {
text-transform:uppercase;
font-size:.8em;
}
#name, #emailform.email, #emailform.web, #emailform.message {
margin:3px 0 10px 0;
padding:3px 0;
border:1px solid #999;
font-family:verdana;
font-size:.9em;
background-color:#dfdfdf;
}
#name {width:120px;}
#remember, #forget {margin-right:3px;}
#email, #web, #message {width:200px;}
#message {
font-size:.9em;
height:90px;
}
</code>
regards,
roelof
Offline
#392 2006-03-24 11:17:02
Re: Plug-in: zem_contact_reborn
roelof wrote:
But now i want to make a custom layout for the form.
My html looks like this :
my css is this :
and your question is…?
Offline
#393 2006-03-24 11:32:20
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: Plug-in: zem_contact_reborn
my question is why the css is not beeing seen.
Nothings has changed.
Roelof
Not ned help anymore.
I solved the puzzle with <code>
#textarea and #input </code>
Last edited by roelof (2006-03-24 13:33:13)
Offline
#394 2006-03-24 22:16:53
Re: Plug-in: zem_contact_reborn
You might be better specifying #zemContactForm textarea and #zemContactForm input or it may conflict with other inputs and textareas such as your comment_form and search.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#395 2006-03-27 19:20:40
- alannie
- Member

- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: Plug-in: zem_contact_reborn
Love the new radio button feature. I am having some issues with the display of duplicate error messages when a required field is not filled in. I’ve checked to ensure my contact form contains only one set of <code>txp:zem_contact</code> tags, plus there’s only one <code>txp:article</code> tag in my template. Any other ideas on what could be causing this duplication?
Possibly related: I have another contact form on my site using the same template, except it’s in a “sticky” article rather than a “live” article. The duplication doesn’t happen there, but making the other form a “sticky” article is not an option.
Any ideas much appreciated, thanks.
Offline
#396 2006-03-27 19:44:39
Re: Plug-in: zem_contact_reborn
hi Alannie,
Are you putting the contact tags inside an article and calling the contact form with txp:article?
Me thinks: You are using an unusual method to display your zem contact form.
It’s more usual to create the contact form as a form (in Presentation -> Form) and then call it from the page template with <txp:zem_contact to="meexample.com” form=“contacto” label=”“ />@, where form="contacto" is the name of the form you created before…
Maybe this fix your issue.
Offline
#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