1

I have this scenario: a content-type A (event) has an entity-reference to another content-type B (location). Now, if an editor adds a new event and enters the (already existing) location by "autocomplete" or dropdown-list, i want to display all other events referenced to that location in the edit form to prevent dups (and redundant work).

I imagine this like a "check colliding events for this location"-button, that is triggering a view perhaps, but it has to be "before" saving the new node.

I already tried a bit with Rules-module, but there's probably no way to trigger this, though the rules-event "before saving new content" is just one step to late, because all the work is already done and all fields are filled...

Is there an approach on module-level for this or do i have to dive into modifying hook_form_alter?

Can someone point me in the right direction? Thanks a lot in advance.

(Drupal 7.14, Views 7.x-3.3+122-dev, Calendar 7.x-3.3+0-dev, Date 7.x-2.5+8-dev, BEF, Address Field 7.x-1.0-beta2)


Update: So far i achieved an approach with a combination of Views and Panels. I override the standard "Node add/edit form" with a panel for my content-type A. To show the nodes of Content-Type B i added a view to that panel. They are shown in a two-column layout.

This works until i bring the "check" into the game. I added an exposed filter to the view, but when i use it, the node form is submitted instead of showing the filtered view.

I opened another question on this issue: Exposed filter of a view embedded in a panel overriding a node form triggers node submission. How to prevent this?

Question: Am I totally wrong with this approach (Panel with View and Form)?

Is it possible to have a custom form with the exposed filter "before" the node form to use the results of the filter to show the view?

I'm lost a bit...

Any help highly appreciated...

  • Can i use "Multi Step Forms" to achieve this? – Volker May 11 '12 at 16:06
0

SOLVED:

Via http://drupal.org/node/1028952#comment-3968840 i found this little module

http://github.com/Itangalo/Node-creation-block--Drupal-7-

that resolved my issue.

Another possibilty (although in dev-status) is the use of this module: http://drupal.org/project/formblock

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.