Obviously this is about my cck fields. Basically, what I to do is want to copy a specific field's value to a hidden field. Is this possible and can this be done using the optional php code?

Comments

joe4’s picture

I am not a pro with CCK but I think this could be done with token.
http://drupal.org/project/token

___________________________________
Adoption Agency Reviews http://www.adoptionagencyratings.com

webpoga’s picture

to clear things up, here's exactly what I want to do,

-A user goes to node/add/product (adds a node, where product is customized using cck)

-There's a "Taxonomy" field after a "Title" field which contains diff. options to choose from let's say "Countries"

-I want to copy the value of that taxonomy field which the user has chosen to a custom hidden field. So that when saved to database, they have the same value.

beautifulmind’s picture

If you aware of jquery you can do this very easily.
Beautiful mind
in.geocities.com/b_joshi19

Regards.
🪷 Beautifulmind

webpoga’s picture

can you give me hints of how this may be possible?
thanks!

beautifulmind’s picture

When user changes the value of the combo box, call the jquery with the .change event of this field and assign the value of the selected item to the hidden field. Simple!

Beautiful mind
in.geocities.com/b_joshi19

Regards.
🪷 Beautifulmind

taqwa’s picture

This is *exactly* what I'm looking for. Can you tell me how you did it? I don't quite understand beautifulmind's instructions.

beautifulmind’s picture

Say your drop down box has id: "my_drop_down"
In your .js file, add following:

$("#my_drop_down").change(function() {
  //your code goes here...
});

:)
Beautifulmind

Regards.
🪷 Beautifulmind