HELP! How to set the value in a attribute_edit_gui

Author Message

Valenti salas

Thursday 30 December 2004 9:24:38 am

Dear,

I have a form where I use the attribute_edit_gui functionality. I need to specify the value of the attribute from a post variable I recive.

I've try:

{attribute_edit_gui attribute=$name parameter="your_name"}

but this do nothing.

Can anyone please tell me how to specify the value of the input type generated by attribute_edit_gui?

many many thanks.

Valenti salas

Tuesday 04 January 2005 10:36:54 am

Please, can anyone help me? I'm in the same problem yet and i can't find any solution for this. In other forms I have used a javascript form instead but in the user registration process form i'm limited to the ez estructure and i have to put user values I recive in post vars to insert in the inputs of the form to give user oportunity to use user information that he is using in other aplication.

Can anyone give me some type of indication on how to put values in the attribute_edit_gui, for example put 'hello' inside the input box generated? I've try to use the 'parameters' to pass the values but it don't work.

Thanks.

Frederik Holljen

Wednesday 05 January 2005 5:41:53 am

When you use attribute_edit_gui the value is automatically inserted from the attribute (a content object attribute) you supplied. If you want to insert your data different than the data in the attribute you need to either:
- Write your own template function (nice if this has to work for many different types)
- Insert the form field directly in your template

Valenti salas

Thursday 06 January 2005 11:04:14 am

Dear,

Thanks for your aswer, but i can't understand you.
Mainly the problem is that the object doesn't exist, because is a form to insert new object. I explain: When a user push the 'register' button, in my own register template I show the different fields of the class user using attribute_edit_gui. The problem is that I want to insert in this fields a pre-values that i recive from other aplication wich detect if the username is present in other application and if it's true ask to the user to confirm or change the information that the system have about it.

The problem is how to put directly value in the attribute_edit_gui in the form, imagine I have a form that create a new user with fields 'username' and 'password' and I like to put a pre-value in the field like 'user001' (a string I generate outside the template).

Can give me some code to put directly in the field some value from the template??

Many many thanks.

Valenti salas

Sunday 09 January 2005 2:41:18 am

Anyone that has returned from holidays can answer me the question about how to put values in attribute_edit-gui directly from the template?

Thanks.

nigel dodd

Tuesday 11 January 2005 10:38:07 am

One way of preloading the fields with data is to give a default value when you edit the class. Perhaps, though, you need to give the value dynamically in which case this will not help. If the latter, then where do you intend to define the data?

Valenti salas

Wednesday 12 January 2005 9:55:02 am

To put a static inicial value in the class is not a posible solution, I have to put dinamicaly the content in the field.

Thanks for your response.

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 19 2025 00:22:42
Script start
Timing: Jan 19 2025 00:22:42
Module start 'layout'
Timing: Jan 19 2025 00:22:42
Module start 'content'
Timing: Jan 19 2025 00:22:44
Module end 'content'
Timing: Jan 19 2025 00:22:44
Script end

Main resources:

Total runtime1.4370 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.1406152.6406
Module start 'layout' 0.00670.0041 740.781339.4766
Module start 'content' 0.01081.4247 780.2578587.5234
Module end 'content' 1.43550.0014 1,367.781316.1250
Script end 1.4369  1,383.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2605160.0002
Check MTime0.00140.0987160.0001
Mysql Total
Database connection0.00090.060110.0009
Mysqli_queries1.373595.5811710.0193
Looping result0.00080.0529690.0000
Template Total1.401297.520.7006
Template load0.00220.155320.0011
Template processing1.399097.358720.6995
Template load and register function0.00010.010310.0001
states
state_id_array0.00140.095210.0014
state_identifier_array0.00110.076520.0005
Override
Cache load0.00190.1333350.0001
Sytem overhead
Fetch class attribute can translate value0.00050.034630.0002
Fetch class attribute name0.00240.166990.0003
XML
Image XML parsing0.00130.090130.0004
class_abstraction
Instantiating content class attribute0.00000.001290.0000
General
dbfile0.00110.0800220.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs