Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1081 2011-09-21 12:38:43
- opto
- Member
- Registered: 2007-05-08
- Posts: 11
Re: zem_contact_reborn 4.0.3.20
Hello,
I’m using zem_contact_reborn as a licence agreement form, but I cannot put the licence text in a textarea: linebreaks are misintpreted an are displayed as raw html. What should I do?
Offline
#1082 2011-09-21 13:12:24
Re: zem_contact_reborn 4.0.3.20
opto No time to check the solution but attribute escape=""
might help.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
#1083 2011-09-21 13:21:57
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: zem_contact_reborn 4.0.3.20
opto wrote:
Hello,
I’m using zem_contact_reborn as a licence agreement form, but I cannot put the licence text in a textarea: linebreaks are misintpreted an are displayed as raw html. What should I do?
Are you sure you need to put the licence text in a textarea? Do users need to edit the text? Wouldn’t it be sufficient to display the licence text with a form containing a ‘do you accept this licence agreement’ checkbox + name + email below?
Offline
#1084 2011-09-21 15:20:03
- opto
- Member
- Registered: 2007-05-08
- Posts: 11
Re: zem_contact_reborn 4.0.3.20
The licence text is long, and the textarea help reducing the page length.
I also tried to use a plain <textarea></textarea> tag inside an article, but the textarea field then contains the text converted sort of like this:
“”
</p>
<p><span class=“caps”>LICENCE TEXT</span> <span class=“caps”>
“”
etc…
this is a bit frustrating, what can I do?
Offline
#1085 2011-09-21 15:35:29
Re: zem_contact_reborn 4.0.3.20
It sounds like you could accomplish the same thing in CSS by declaring a height for the containing element, along with overflow:scroll.
Last edited by johnstephens (2011-09-21 15:36:22)
Offline
#1086 2011-09-21 15:43:15
- opto
- Member
- Registered: 2007-05-08
- Posts: 11
Re: zem_contact_reborn 4.0.3.20
Thank you, this is beyond my capabilities though :(
Offline
#1087 2011-09-21 15:50:23
Re: zem_contact_reborn 4.0.3.20
I don’t know what your containing element might be, but let’s say you use a div
, like so:
<div class="tos">
My lengthy terms of service...
</div>
Then, in your stylesheet, you could add this:
.tos {
height: 20em;
overflow: scroll;
}
You might need to adjust the height
value based on the media and other design needs, but that should work.
Offline
#1088 2011-09-21 15:50:36
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: zem_contact_reborn 4.0.3.20
opto wrote:
The licence text is long, and the textarea help reducing the page length.
That’s what I thought. Textareas are for text input from the user, such as comments or questions in contact forms. If you just want to put a large amount of text in a small space, you need to use a css like johnstephens says.
You specify the height and width of the box that your licence text will go into, and if there is any overflow (text that doesn’t fit into that space), there’ll be a scrollbar to show the rest of the text.
<div class style="height:100px; width:200px; overflow:scroll;">
<p><span class="caps">LICENCE TEXT</span></p>
<p>etc...</p>
</div>
and after that, you can insert the zem_contact form so users can accept the agreement.
The height and width properties above obviously define the size of the box (besides pixels you can also use another unit such as % or em, which corresponds to the font size). The overflow property ‘scroll’ ensures there are always both horizontal and vertical scrollbars, even if the text would fit in the defined space. You could also set it to overflow:auto
– in that case you’ll only get a vertical scrollbar when there is indeed more content to scroll to.
When you use a div like this inside an article, you don’t have to use HTML for your licence text, you can also just use Textile and format the text just like you would any other article text. So then it’d be something like:
<div class style="height:100px; width:200px; overflow:scroll;">
h2. LICENCE TEXT
Bla bla *bla*. Bla bla bla.
Etc.
</div>
Edit – ah, few seconds too late to be helpful :) – anyways, see johnstephens’ post above – does the exact same thing as I’ve described here, just with the css in the stylesheet instead of inline.
Last edited by M_i (2011-09-21 16:28:18)
Offline
#1089 2011-09-21 16:26:46
- opto
- Member
- Registered: 2007-05-08
- Posts: 11
Re: zem_contact_reborn 4.0.3.20
Thank you, this is what I needed!
Offline
#1090 2011-09-21 17:15:59
- M_i
- Member
- Registered: 2006-03-05
- Posts: 122
Re: zem_contact_reborn 4.0.3.20
opto wrote:
Thank you, this is what I needed!
I got some brilliant advice from ruud yesterday, and I always try to pay it forward;)
Offline
#1091 2011-09-27 05:12:55
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: zem_contact_reborn 4.0.3.20
is there a way to style the color of the text inside the fields?
it seems that .zemText and .zemTextArea controls the color of both the text outside the field and inside the field, but i just want to change the color inside the field.
here is my form here
Last edited by dreamer (2011-09-27 05:13:24)
Offline
#1092 2011-09-27 05:18:47
Re: zem_contact_reborn 4.0.3.20
dreamer wrote:
here is my form here
one of the nicest looking forms i have seen. Can you share the zem_contact code?
…. texted postive
Offline