Closed (outdated)
Project:
Dialog
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Jan 2010 at 04:55 UTC
Updated:
6 Jan 2017 at 20:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
zroger commentedCan you show me the code you are using to invoke dialog_get_form? node_form() is particularly tricky, even with the standard drupal_get_form, since the actually form id is something like 'node_page_form'.
Comment #2
dropchew commentedHi,
my code is similar as below. eg, I wanted to add a page node type.
Comment #3
zroger commentedcheck out how node_add (http://api.drupal.org/api/function/node_add/6) builds a dummy node to pass to drupal_get_form. you will need to do something similar.
Comment #4
zroger commentedComment #6
brenv commentedHi folks,
I've been playing with this after Modal Frame API drove me crazy and thanks to Dialog goodness, I am nearly there. I have a content type Person which has a CCK field which node references an Address content type. I have got my person node add form popping up the dialog to create the address node (based on Roger's suggestion to build a dummy node above) and I include my code below in case it helps anyone. I think it is what the original requester asked for.
On my person add node form I have added an 'Add a new address' link to the following URL - node/add/address/nojs
Then I have a module called dialogforms which does the dialog stuff. The code is below, apologies if it looks ugly, I'm new to all of this.
One thing, be careful of the 'explode' call in the dialogforms_nodes_callback function as it is a sort of generic callback function and for me none of my content types have underscores in their names. If yours do, you'll have to modify it. It's a bit ugly I guess, but it's just a prototype to see if I could get it to work.
The only problem I have is that on submitting the form I reload the person add node form which is alright, but ideally I want to just reload the address CCK field in that form to include the address I just added, but I have no idea how to do that. In another issue I see Roger you say
I have created that function as you will see below, but is it limited to the ctools ajax functions? Is there a way to get them to just reload the CCK field? Or is there something else I can do. As I said, I'm new to this so swimming in the dark a bit and any help would be greatly appreciated. Thanks for a great module!
Comment #7
amitaibui think we should add a generic node add/edit functionality.
This patch - a work in progress adds node-add as dialog. Patch also starts cleaning up dialog_example.
settings to needs review, to get early feedback.
Comment #8
entrigan commentedI expanded on Amitaibu's patch to add node edit functionality. I had issues with the whole adding files patching nonsense, so I am just uploading the whole module.
To use this module (or Amitaibu's patch) one needs to create their own links (this does not override the normal node add/edit pages).
E.G.
Also I am wondering how can I debug the $commands array. dpm($commands) watchdog(..), etc yield nothing if triggered after the $commands array is created. I am baffled?
Comment #9
drewish commentedLooks like there's a module for this already: http://drupal.org/project/dialognode
Anyone disagree with the fixed status?
Comment #10
amitaibuThat module is actually for viewing a node not add/ update.
But anyway, I'm not sure if this functionality is easily done with Dialog.
Comment #12
kevinob11 commentedAny news on this?
Comment #13
obrienmd commentedThis is not fixed.
Comment #14
ayalon commentedI needed this functionality on a live site and tested and corrected the proposed patch. It's working fine.
Additionaly, there is now support for hierarchical select fields on the node form.
Comment #15
Anonymous (not verified) commentedI used the work in #8 and extended it quite a bit to support all node CRUD. I've been using the module for a few months.
http://drupal.org/sandbox/bangpound/1317400
Comment #16
devin carlson commentedDialog 6.x is no longer supported.