Problem with form width in form templates

Author Message

Tor Olav Steinsvoll

Saturday 26 July 2003 3:20:12 am

I hope that there is someone that can help me a bit here. I have trouble with setting the size of the form. I tried to put the form inside a table and set the width of the table but that didn't work. I also tried to set style in a stylesheet, but that didn't work either.

Here is the code I am using:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
{default content_object=$node.object
content_version=$node.contentobject_version_object
node_name=$node.name}

<form method="post" action={"content/action"|ezurl}>

<b>Subject</b>

<div class="skjema">{attribute_view_gui attribute=$node.data_map.subject}</div>

<b>Feedback</b>

<div class="skjema">{attribute_view_gui attribute=$node.data_map.feedback}</div>

{section name=ContentAction loop=$content_object.content_action_list show=$content_object.content_action_list}
<div class="block">
<input type="submit" name="{$ContentAction:item.action}" value="{$ContentAction:item.name}" />
</div>
{/section}

<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$content_object.id}" />
<input type="hidden" name="ViewMode" value="full" />

</form>

{/default}

</body>
</html>

Can someone please tell me what I am doing wrong here?

Regards from Tor Olav

Robin Sørlie

Saturday 26 July 2003 3:35:00 am

What do you mean by form width? I assume you mean the box where visitors can write their stuff. You can try this:

<b>Subject</b>

<div class="skjema" style="width: 200; height: 20">{attribute_view_gui attribute=$node.data_map.subject}</div>

<b>Feedback</b>

<div class="skjema" style="width: 200; height: 20">{attribute_view_gui attribute=$node.data_map.feedback}</div>

Just alter the width to what you need. Pretty sure you can spesify this in .css to.

-Robin

Tor Olav Steinsvoll

Saturday 26 July 2003 8:58:33 am

Thanks for your help Robin, but I got the same result as before. The texfield is way to wide.

I think it has to be some override I don't understand here. What you told me I tried to do in the CSS file too.

Any other suggestions?

Regards from Tor Olav

Bjørn Kaarstein

Monday 28 July 2003 12:10:16 am

Try to copy the core.css from standard to your own stylesheets folder. Then I think you need to alter some of the items under /* FORMS */. Like i.e. input.box, textarea.box
{
width: 200px;
}

Regards Bjørn

Robin Sørlie

Monday 28 July 2003 6:18:37 am

Yes, that might work, try to alter this in core.css:

/* FORMS */

form
{
padding: 0px;
margin: 0px;
}

input.box, textarea.box
{
width: 468px;
}

input.halfbox, textarea.halfbox
{
width: 230px;
}

Didn't think of that cause you didn't have any reference to this class in your html code, but since you use the attribute function I guess this automaticly points to core.css

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:17:07
Script start
Timing: Jan 31 2025 04:17:07
Module start 'layout'
Timing: Jan 31 2025 04:17:07
Module start 'content'
Timing: Jan 31 2025 04:17:07
Module end 'content'
Timing: Jan 31 2025 04:17:07
Script end

Main resources:

Total runtime0.0145 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2656151.2266
Module start 'layout' 0.00530.0029 739.492236.6797
Module start 'content' 0.00820.0050 776.171994.0781
Module end 'content' 0.01320.0012 870.250033.9922
Script end 0.0144  904.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002416.6400140.0002
Check MTime0.00117.3322140.0001
Mysql Total
Database connection0.00064.281210.0006
Mysqli_queries0.002819.034630.0009
Looping result0.00000.075910.0000
Template Total0.00096.510.0009
Template load0.00074.530210.0007
Template processing0.00031.972410.0003
Override
Cache load0.00053.113610.0005
General
dbfile0.00117.925980.0001
String conversion0.00000.042940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs