Hello. I am trying to create a custom view, but I have no idea where to start. The view is for a create entity page. Let's call the entity 'review'. It has a foreign key (many to one) to an entity, let's call it 'movie', and the movie entity has a many to many relationship with another entity, let's call it 'directors'. The review entity also has a one to many relationship with a 'director review' entity. In plain words, I'd like to force the user to review both the movie and all its directors. That means creating a view listing all the fields in the 'review' entity that need to be filled, let's say rating and comment. But also it needs to allow input of reviews for each director related to that movie. Then, it would save the review data in the review entity and in the director review entities.
I am not sure where to start, documentation seems quite thin and the code seems quite complex. I haven't found an existing entity that does something similar. I think I should wait for an event on the 'movie' field, and when a movie is selected, the movie field, besides becoming read-only, would trigger an ajax loading every director related to that movie, then creating a box with all the fields for each director, but I have no idea how to do that. Then, when saving, I would check if all the fields were filled in, or perhaps the existing code does that already for fields marked mandatory.
I am quite lost, any help is appreciated. Thanks!
I am not sure where to start, documentation seems quite thin and the code seems quite complex. I haven't found an existing entity that does something similar. I think I should wait for an event on the 'movie' field, and when a movie is selected, the movie field, besides becoming read-only, would trigger an ajax loading every director related to that movie, then creating a box with all the fields for each director, but I have no idea how to do that. Then, when saving, I would check if all the fields were filled in, or perhaps the existing code does that already for fields marked mandatory.
I am quite lost, any help is appreciated. Thanks!
Comment