I am trying to find solution how to hide check box in "EDIT content" but I need create revision.
My users have to edit content, but I need to know what they did. If I hide "checkBox" where is "create new revision" then no revision was created.
I tried "hide revision module" but if user did not see this "checkbox choice" then new revision was not created.
I tried last drupal version 9.1.5 - no luck. Version 8.2 and older is not working on my machine. I found some topic with this problem but without solved.
I would like to add a statement to my e-shop. I would like something like "Order has products and quantity" but instead of products, i would like "product category and quantity". For example i have 4 products in my cart and the 2 of them are from the same category "books", i would like for example 10% discount only to these two products. I tried "product category:books" and "'total item in order' equals to 2" but refers to all products in cart and not to the specific category "books".
In a Movimenti content type, I have several fields one of these is an entity references, linked to an Anagrafica Dipendente data content type.
The field is enhanced by a function. In form_alter I need to take a field of the Anagrafica Dipendente.
I saw the array of the field and was thinking of using this code
$id = $form['field_dipendente']['widget'][0]['target_id']['#default_value']['id'];
But the error returns to me
Error: Cannot use object of type Drupal\node\Entity\Node