Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-04-06 14:27:34

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

adjust zem_contact layout

How do I modify the way the e mail form displays? As you know, the default is

NAME
E MAIL
MESSAGE

and what I’d like to have is

NAME MESSAGE
E MAIL

….in other words, just adjust the layout of the text areas.
Thanks.

Offline

#2 2006-04-06 17:34:16

tranquillo
Archived Plugin Author
Registered: 2005-03-07
Posts: 127
Website

Re: adjust zem_contact layout

Use the tags of zem_contact:

<code><txp:zem_contact>
<txp:zem_contact_name />
<txp:zem_contact_textarea />
<txp:zem_contact_email />
<txp:zem_contact_submit />
</txp:zem_contact></code>

See the help text of the plugin for further explanations.

Offline

#3 2006-04-06 19:28:34

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: adjust zem_contact layout

OK I’ve been looking into this for over an hour, and still can’t work out the solution. For someone who doesn’t know php, it is impossibly confusing suddenly being presented with all the code for a plug in. Tried a few hit and miss alterations in what seemed to be the right place, using this advice from the help file:

break – Break tag between the label and field. Default is <br />. Use break=’‘ to put the label and input field on the same line.

– didn’t seem to do anything. And theres no mention there of changing the default vertical layout <br>

to what I want which is more horizontal…………

Offline

#4 2006-04-06 19:32:52

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: adjust zem_contact layout

I will reiterate the suggestion made previously by tranquillo—for what you are trying to accomplish you do not need to edit the plugin code, but rather the form where you are using the zem_contact tags. Could you please post the current contents of that form?

-Kurt


kurt@kurtraschke.com

Offline

#5 2006-04-06 20:29:49

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: adjust zem_contact layout

OK thanks, if you have some ideas about this (and I was confused – I thought this required edting the plug in code). I think this is the form you are referring to:

<code><txp:zem_contact mailto=“nospam@yahoo.com”> <p><txp:zem_contact_text label=“Name” required=1 /></p> <p><txp:zem_contact_email required=“1” /></p> <p><txp:zem_contact_textarea required=“1” /></p> <txp:zem_contact_submit /> </txp:zem_contact></code>

Last edited by jameslomax (2006-04-06 20:30:44)

Offline

#6 2006-04-06 21:21:37

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: adjust zem_contact layout

Okay, so presently each one of the fields is in its own <p>, so it ends up on its own line. All you have to do is adjust the HTML as you would in any other form to produce the desired results. Something like the following may produce what you’re looking for:

 <txp:zem_contact mailto="nospam@yahoo.com">
<p><txp:zem_contact_text label="Name" required=1 /><txp:zem_contact_textarea required="1" /></p>
<p><txp:zem_contact_email required="1" /></p>
<txp:zem_contact_submit />
</txp:zem_contact>

-Kurt

Last edited by KurtRaschke (2006-04-06 21:22:06)


kurt@kurtraschke.com

Offline

#7 2006-04-07 09:25:26

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: adjust zem_contact layout

Yes that looks more balanced, thanks.
Is it possible though, to arrange the layout like this:
<br>
NAME FIELD &nbsp; &nbsp; &nbsp; &nbsp; MESSAGE FIELD
E MAIL FIELD
<br>
- I can’t work out how to do that, even by adjusting the <code>p</code>

Offline

#8 2006-04-07 15:39:46

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: adjust zem_contact layout

So the goal is a larger gap between the name field and the message textarea? Probably best to do that in CSS, with either a margin-right on the name field or a margin-left on the message textarea.

-Kurt


kurt@kurtraschke.com

Offline

#9 2006-04-07 16:55:57

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: adjust zem_contact layout

KurtRaschke wrote:

So the goal is a larger gap between the name field and the message textarea? Probably best to do that in CSS, with either a margin-right on the name field or a margin-left on the message textarea.

Yes a gap, but more importantly the three areas are arranged horizontally and not vertically: name and e mail on the left, and message on the right.

How do I do that in css?

Offline

#10 2006-04-07 18:03:35

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: adjust zem_contact layout

You can do it with CSS floats. There are plenty of CSS tutorials out there.

-Kurt


kurt@kurtraschke.com

Offline

Board footer

Powered by FluxBB