❌

Normal view

Received β€” 13 September 2025 ⏭ Drupal - Open Source Content Platform | #Celebr8D8

JSON API, filtering by relationships records possible?

Hello,

I've got two content types:
Houses, Flyers

Houses is mostly just address, name - that's it.
Flyers contains media field to upload files and a reference to a house.

So 1 House : n Flyers - Relationship.

Now, I'd like to use the API to retrieve all Flyers with a certain House ID.
I've got the ID, I can see all the Flyers via Postman, when I GET URL/jsonapi/node/flyer
and I can see inside each flyer:

 ... "field_something": "xyz" }, "relationships": { ... "field_house": { "data": { "type": "node--house", "id": "893aa231-e276-4f47-a3c0-efavfdv", "meta": { "drupal_internal__target_id": 960 } }, a aaa 

Somehow, I can filter by all fields inside attributes.
Is it possible to filter by by details inside relationships as well?

When I filter like:

flyer?filter[relationships.field_house.data.id]=893aa231-e276-4f47-a3c0-efavfdv

I get a response:

 "errors": [ { "title": "Bad Request", "status": "400", "detail": "Invalid nested filtering. The field `relationships`, given in the path `relationships.field_house.data.id`, does not exist.", 
submitted by /u/Chris8080
[link] [comments]
Received β€” 27 August 2025 ⏭ Drupal - Open Source Content Platform | #Celebr8D8

How to "hide" node/42 from users (if they have technical access to it)?

I'm building some sort of multi tenant system.
If there is entity A from one company with two registered users, I'd like entity A to be visible to both users.

Currently, I've added a reference field to the users and I'm using views with relationships to show entity A to both users.

But I assume, there is a better / saver way of doing thing?

User C could probably just enter node/42 and see entity A - even though user C is working in another company.

submitted by /u/Chris8080
[link] [comments]
Received β€” 21 August 2025 ⏭ Drupal - Open Source Content Platform | #Celebr8D8

How to build data entry journeys that are nice / eye pleasing to use?

Hi,

let's assume, we have content types like 'my profile' for a community.
Or 'my preferences' for a customer preference center.
Or 'my claims' for an insurance website.
Or 'publish an event' for an event website.

The content type is quite clear - name, multiple fields in the appropriate data types.
However, displaying those content type forms is rather 'ugly'.

I'd like to have a multi page or multi step form. The form should save directly without clicking on save and reload. The inputs should be switches instead of checkboxes, etc.

What I've tried is,

  • to use field groups in order to structure the form layout to some extend.
  • using field permissions to hide the fields that are being calculated in the background.
  • using Conditional Fields where reasonable
  • there is a module 'Form Mode Control' which I'm using to show only parts of the form
  • using webform to build nice forms and then ECA or Webform Content Creator to create / populate nodes / entities

Are there any better approaches? (no custom development / front-end development)
Are there any good modules that will make data entry for longer forms more bearable?

submitted by /u/Chris8080
[link] [comments]
❌