drupal - Programmatically get and set field values -
I have two fields that I want to fill with exactly the same values; Users should fill only one. I also have a function that checks whether the second field is empty or not. How are the field values obtained in dripple 6 and drupal 7 and set? EDIT: I'm just trying to edit the module. Yes, I'm talking about the node field. The $ node array has the ID of the words added only in the node. How can I know my name? Since you have tagged this question with cck. I think that with the node field Are working. To copy the value of one field ( x ) to another ( y ), you can either install the module and set it up So that the value of y is calculated by the value of x , or you can create a custom module with something similar to the following: This hook copies all data in the field x from x : function mymodule_node_presave ($ node) {$ node -> field_y = $ node- & gt; Field_x; } This hook simply copies the value of the first instance of the x field y fi...