Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I am working on a site to track my daily carbohydrate intake. I can represent a Food item that I might eat, say a taco as a Content Type. I would call it 'Food' and it would have fields for name, description, and # of carbs. The problem comes with representing a meal. For a given meal, say Monday Lunch, I could eat several tacos and a burrito. I can't quite see what Content Type could hold entity references to multiple different Food nodes as well as an amount eaten of each Food node.
We want to add a 'Remember me' checkbox in the login form.
On checking the checkbox and submitting the form, we save the username and password in Cookies and we pre-fill when the user visits the login page next time.
But the page is cached with the cookie values and it's delivered to other users with the values.
It's major security threat.
How to achieve the feature without affecting other users?
However as I suspected it doesn't fully work with the media library module. The library shows uploaded media but it doesn't allow one to add new media.
Upon investigation is seems I may need to create the form by extending the class
I'm trying to set the title attribute of an image (multiple) field using hook node presave. I will ultimately be using the filename without the extension but for now I'd just like to get the title to set then I should be right to build that variable.