Skip to main content
3 of 4
added 74 characters in body; edited title
Eluchel
  • 387
  • 3
  • 17

How to save field data

I need to programmatically save some field data (when a node of type A is saved I want to take the data from type A's title and path alias and put them into a link field called field_alternative_titles_title), I have just started recently getting into the programming side of Drupal, and I am not sure what function is the right one to do that.

I did some research, is field_attach_insert the function I would call to take that title and path alias and save them to my link field?

Or would hook_field_storage_pre_insert be the function to do that?

Eluchel
  • 387
  • 3
  • 17