Skip to main content

Timeline for How to change field value of a node

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Nov 15, 2013 at 3:10 vote accept vintorg
Nov 15, 2013 at 3:10 comment added vintorg I think one of those two will do it. Probably _load(), since I'll want the data to be formatted if loading an object programmatically.
Nov 15, 2013 at 1:58 comment added leexonline That's going to depend on where the data is being displayed. Through a node template or a view you can use field and views-field templates respectively. If you want to alter the data everywhere it's loaded, you might want to look at something like hook_entity_load or hook_entity_view.
Nov 15, 2013 at 1:35 comment added vintorg I'm sorry, I'm not being clear. I know how to save the values to their corresponding entities. What I'm trying to do is modify the markup, pre-render, on the fly.
Nov 15, 2013 at 1:17 comment added leexonline Sorry, I have edited my answer to reflect this.
Nov 15, 2013 at 1:17 history edited leexonline CC BY-SA 3.0
added 1035 characters in body
Nov 15, 2013 at 0:42 comment added vintorg The values are saved, and exist in the entity (a commerce product entity). They have been butchered, and there are too many of them. So, I need to modify them pre-render to clean them up.
Nov 15, 2013 at 0:16 comment added leexonline The values are not already saved, that's why the function is called 'presave' and the description states: "This hook is invoked from node_save() before the node is saved to the database."
Nov 15, 2013 at 0:11 comment added vintorg How about hook_field_prepare_view()?
Nov 14, 2013 at 23:55 comment added vintorg These values are already saved. How can I manipulate it on the fly?
Nov 14, 2013 at 23:29 history answered leexonline CC BY-SA 3.0