Relative Content

Tag Archive for drupalhook

Drupal 10.3 hook_entity_prepare_form()

I’m trying to set a text list field value when a form is loaded but can’t seem to get the following code to work. As the value has dependencies I’m not able to use hook node form alter or use the default value with form state.

Drupal hook update issue

I am working on Drupal 10. I need to update the status field to “TRUE” for the existing content type nodes. I have used hook_update to update 700 nodes… But once the hook_update runs, it is updating the first 250 nodes alone… Again i run the hook update, the next 100 nodes are updates. in single execution, nodes are not updated.