Forums / Setup & design / Width of string in forms

Width of string in forms

Author Message

J-A Eberhard

Tuesday 01 March 2005 6:12:58 am

I need to understand how to pass from a form template a value for the width of an text inpuit field.

The template used is design/base/override/template/edit/eztext.tpl

On the top of it I have this line
"{default attribute_base='ContentObjectAttribute' html_class='full'}"
Then it uses
"<input class="{eq( $html_class, 'half' )|choose( 'box', 'halfbox' )}" type="text" size="70" "

So, I need, from the template of the form to assign a value to html_class in order to have some fields as box and some as halfbox.

Any experimented form designer around?

Thanks
Jacques-André

How can I assign a value to override

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Łukasz Serwatka

Tuesday 01 March 2005 12:06:56 pm

Hi,

You can assign value to html_class using this code. html_class is a parameter of attribute_edit_gui. I hope it will help.

{attribute_edit_gui attribute=$node.object.data_map.your_attribute html_class=full/half}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

J-A Eberhard

Wednesday 02 March 2005 12:15:13 am

Thanks, it does help...

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

eZ debug

Timing: Jan 18 2025 20:54:54
Script start
Timing: Jan 18 2025 20:54:54
Module start 'content'
Timing: Jan 18 2025 20:54:54
Module end 'content'
Timing: Jan 18 2025 20:54:54
Script end

Main resources:

Total runtime0.0213 sec
Peak memory usage4,096.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7109180.8359
Module start 'content' 0.00610.0081 768.546993.9922
Module end 'content' 0.01420.0071 862.539170.7031
Script end 0.0212  933.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002310.7533120.0002
Check MTime0.00104.8428120.0001
Mysql Total
Database connection0.00104.839510.0010
Mysqli_queries0.002311.014840.0006
Looping result0.00000.076020.0000
Template Total0.006631.110.0066
Template load0.00115.152510.0011
Template processing0.005525.877610.0055
Override
Cache load0.00062.790310.0006
General
dbfile0.004420.6256100.0004
String conversion0.00000.032430.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs