3

I have created a view, and there is one column named "forward to delete". I want to open an entity form in a pop-up after clicking on this link and get the node id of the clicked node so that I can use this node id for other purpose.

I am using the entity form module.

2
  • take a look at Ctools Modal, you can find ton's of examples here and on google..
    – xurshid29
    Apr 3, 2014 at 11:41
  • I wrote a module that works well with Drupal forms as well: drupal.org/project/ng_lightbox
    – benjy
    Jul 12, 2015 at 1:29

4 Answers 4

0
  1. Make sure you have 7.x-1.4 of the entityform module installed or this won't work.
  2. Install the Modal operations module.
  3. Install the Modal forms (with ctools)
  4. Enable the Modal entityforms module that came as part of the modal module.
  5. Create a link to your modal popup like this:

<a href="/modal/entityform/YOUR_FORM_IDENTIFIER/nojs/0" class="ctools-use-modal ctools-modal-modal-popup-small">Open Entity Form in Popup!</a>

I found this blog post very useful for figuring this out and getting it working.

If you cannot use version 7.x-1.4 for some reason then there is a patch here that some have had success with however I could not get it to work this method.

1
  • I am using ECK and create 3 form but 2 forms is working fine.. 3rd form I am calling one menu callback in 3rd form i have created 3 fields 2 fields i am getting value through entity refrence but when i submit eck form in the database value not inserted but row is created Nov 17, 2014 at 13:10
0

An easy example may be to use the Simple Dialog module. You can point it to an HTML ID of the form or any element on the original page and it pops up in a dialog box. I think this would be used if you are going for a simple solution.

<a href="path/to/target/page/to/load" class="simple-dialog" rel="width:900;resizable:false;position:[center,60]" name="id-of-element-on-target-page-to-load" title="My Dialog Title">Link</a>
0

I think what you are looking for is the ctools modal functionality. Without further digging into that - because I think the following tutorial is comprehensive, easy to understand and complete - here is a link that will help you: https://www.deeson.co.uk/labs/insert-form-pop-modal-ctools-and-drupal-7

Some important things you should not forget:

Add the ctools module as dependency. Add the callback to the menu. Include the ctools js files on the page where the link to the title popup is. ctools modal helped me a lot! Give it a try!

0

On a site where I used panels and colorbox + colorbox node already, I installed entity form block, placed it on a custom page and pointed a colorbox-node at it.

Gave a nice benefit of being able to place some other panes around the form in the modal.

The other answers are better if you don't really use those modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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