Hot answers tagged

2

Your route doesn't have a parameter called node, so therefore $node is null. In order to make node available as a parameter you have to be on a route that has node as a parameter. So to add the node parameter to your route, you can do like this: rsvplist.form: path: '/rsvplist/{node}' defaults: _form: '\Drupal\rsvplist\Form\RSVPForm' _title: '...


1

If you don't need to have filters or sorting or other view related things interacting with books or classes then I would set the view up to not display fields and use relationships, etc. Rather I'd configure it to display a view mode of the Student. Then do all display configuration for what should appear about the student in that view mode. I find using ...


1

I changed the code like this and it worked. db_query("UPDATE {field_data_field_status_tracker} SET field_status_tracker_value = 'Inactive' WHERE entity_id = $entity_id2"); Thanks :)


1

thinking the fastest way to do this one is hook_node_insert() ... see https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_ENTITY_TYPE_insert/8.2.x if i am following what your saying, you want to set the value of 'field_section' the newly created taxonomy term in tags? if so the following will get you started ....


1

You can use hook_ENTITY_TYPE_insert which is called after the node has been saved. Function description: This hook runs once the entity has been stored. Note that hook implementations may not alter the stored entity data.


Only top voted, non community-wiki answers of a minimum length are eligible