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.