Hey,

This is a continuation of http://drupal.org/node/391766#comment-2420608 but since it was marked as bydesign I'm reopening a new ticket based on this simple problem:

Puttering around, I found its quite easy to get a node form to open up in lightmodal. The issue is getting the JS of the CCK fields to work. After poking around the issue queue, I found that lightbox can open a CSS ID (and class too, I think). Since the node form has its own unique ID, I just plagged that into the link and it works just fine! Kinda like this:

Add Story type

This will open up the node form, and everything submits just fine. The problem at the moment that I am having is that there doesen't seem to be support for javascript in the modal. Fieldsets wont collapse/expand, cck date picker widgets don't work, and autocompletes also do not work - but everything else works just fine.

Is there a way to include the JS files into the modal? Do I just include them on a tpl.php file? If it could be this simple to open up node forms in modal we would have an enormous breakthrough on our hands.

Thanks!

Comments

rc2020’s picture

Okay, sorry, I forgot to include my links with the a code tag. The "Add story type" link above should appear as:

<a href="/node/add/story #node-form" rel="lightmodal">Add Story type</a>
rc2020’s picture

Does anyone have any ideas on this? I am pretty darn excited about these prospects, I'd love someone elses opinion about this and how we can make it happen, it seems so straightforward but I've just hit a wall.

Thoughts?

Thanks!

rc2020’s picture

Anyone, anything? I might have to shell out a good chunk of change to have this done - if anyone has even the slightest idea or suggestion a response would be very much appreciated.

Thanks!

Rosamunda’s picture

subscribing

rc2020’s picture

Status: Active » Fixed

drupal automodal, http://drupal.org/project/automodal, solves all of the above problems comprehensively and easily. I am marking as fixed as this is the only clear and working solution for node forms in modal on drupal, that I am aware of at least.

Rosamunda’s picture

Hi!
I´ve tried automodal, but there are 2 problems with it:

1. The window won´t appear with the "lightbox" mode, with the black backgrouund, and the nice close button.

2. It will appear the whole node, how can I manage to show only the form content?.

What am I missing or doing wrong here? I´ve tried

<a href="/node/add/alta-comunitaria" 
rel="lightbox" class="automodal">
Registr&aacute;te</a>

Thanks!

rc2020’s picture

This is the lightbox queue, you'll need to file automodal issues in the automodal queue, the modules are completley seperate from one another.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

d34dman’s picture

Project: Lightbox2 » Automodal
Version: 6.x-1.9 » 6.x-1.0

With respect to #7, diverting this issue to proper project.