OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
CCK - Problem with a field in add instance (0 viewing) 
Go to bottom Favoured: 0

CCK - Problem with a field in add instance

hcohl (User)
Senior Boarder
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
CCK - Problem with a field in add instance 8 Months ago
Karma: 0  
I have a loyout of the type add instance called: "Bewerbungen DE add".
In the field mail I have the entry: <p>{|text_textfield_34|} </p>
textfield_34 should be "OP-23-790"
But the output in the mail is "103.309.738-19"
The valu for textfield_34 comes from another field by this custom code:
"jQuerOs( document ).ready(function() {
jQuerOs(".text_textarea_49".val( jQuerOs(".text_textfield_17".text() ) ;
});"
Sometimes it works fine, somtimes it displays the wrong value.
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8247
graph
User Offline Click here to see the profile of this user
Re:CCK - Problem with a field in add instance 8 Months ago
Karma: 101  
Hello

If you check your last request in joomla CCK , You will see field: text_textfield_34 has value "103.309.738-19".
In Add Instance layout, we set only default value to field "text_textfield_34"(which we receive from value another field), But real client may type to this field anything. So client and added there "103.309.738-19".

When you added for this field some default value - we understand, real client may type there some more specific info.
If you no need for somebody may add some info to this field - Please hide it from clients.
You may do this if will add to your CSS code like:

Code:

 .text_textfield_34 {
display: none;
}



Regartds
OrdaSoft team
Logged Logged
The administrator has disabled public write access.
hcohl (User)
Senior Boarder
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
Re:CCK - Problem with a field in add instance 7 Months, 3 Weeks ago
Karma: 0  
Thank you for your answer.
But
the field must be shown. And the user should not be able to change its value.
How can I do this?
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8247
graph
User Offline Click here to see the profile of this user
Re:CCK - Problem with a field in add instance 7 Months, 3 Weeks ago
Karma: 101  
Hello

May be best way there:
- Hide fields as we proposed before
- at top form you add "Custom field" -> with type "PHP" and there add

Code:

 echo "<h6>".{|text_textfield_17|}[0]->data."</h6>";

so at form top - you will see "text_textfield_17" value


Regards
OrdaSoft team
Logged Logged
The administrator has disabled public write access.
hcohl (User)
Senior Boarder
Posts: 47
graphgraph
User Offline Click here to see the profile of this user
Re:CCK - Problem with a field in add instance 7 Months, 2 Weeks ago
Karma: 0  
I added a field custom type php
and added this code
echo "<h6>".{|text_textfield_34|}[0]->data."</h6>";
But then the total side is error
Logged Logged
The administrator has disabled public write access.
admin (Admin)
Admin
Posts: 8247
graph
User Offline Click here to see the profile of this user
Re:CCK - Problem with a field in add instance 7 Months, 1 Week ago
Karma: 101  
sorry, in what layout you added this ?

You may add code like that, only to "show instance layout" and only if in this instance you have field "text_textfield_34"

Regards
OrdaSof team
Logged Logged
The administrator has disabled public write access.
Go to top
»