Posted by 2biazdk on December 11, 2009 at 3:42am
12 followers
Jump to:
| Project: | Form Block |
| Version: | 6.x-1.0 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | 2biazdk |
| Status: | active |
Issue Summary
Brilliant module! But at the moment I'm in need of a way to include an edit-form in panels, so that the user can change his data. (The edit form is a Content_Profile node.)
Is there a way to include an existing node as an editable form with FormBlock and not just an empty form?
Comments
#1
subscribing - I'm interested if this is possible as well.
thanks
#2
+1 subscribing
#3
Closed #675556: Can I use this module to display the edit node form in a block? as a duplicate of this.
#4
Subscribing to this, the active one of the duplicates.
I too want to add or edit a Content Profile node in a block.
#5
Subscribing. Would be great to have edit forms added to this module!
Currently I'm using my own solution in a block (PHP input format) that utilises Drupal functions:
<?phpglobal $user;
$type = 'preferences';
module_load_include('inc', 'node', 'node.pages');
$node = node_load(array("type" => $type, "uid" => $user->uid));
if ($node) {
$form = drupal_get_form($type .'_node_form', $node);
print_r($form);
}
?>
I can't think of another way of doing this. Would have thought it would be a good way to approach the problem, however this block seems to have terrible performance implications for me when an authenticated user lands on the page (30 seconds load time). If you don't have +100k nodes though maybe it's fine for most sites. Thoughts/improvements?
#6
Subscribing.
#7
The question would be, how to provide the block with contextual information on which node is to be edited?
Because we're putting forms in a block, we can't assume any particular context from the path.
Probably the most likely way would be providing a context-aware Panels plugin?
Maybe Panels already does this?
#8
panels does provide the possibility of adding node edit forms within it (or inside a minipanel <-- basically the same as a block)
the problem i have had is with adding multiple node edit minipanels in the same panel.
for this problem the above example code is perfect!
I'm not sure what you would enhance in this module other than maybe the possibility to make it a node-edit block instead of a node-add block with the click of a button?
then it would simply be generalizing the code posted above by bkno so that it takes the argument from the block edit panel or the current node it's put in?
anyway, thank you for your help here, and the cool module!
#9
Wouldn't the editable fields module work better for you in this case? Each field you set would be edited right there on the node, not in a block.
#10
I'm a newbie, so a little confused. I am building a website where my users enter their athletic activities on a given day (a run, for example... with the distance, duration, time of day, etc etc etc as details). People should should be able to comment on the run ("Good Job") the run should be able to be posted on Activity or Heartbeat, you should be able to subscribe to the person's "logs" so you are notified when he updates.
Lots of cool functionality. I'm trying to figure out what is the best way to create a form for this type of data entry.
The data needs to be editable... and it also needs to be able to be pulled into different views throughout the site.
I created a "logs" page that will, in theory, contain views of my latest workouts, upcoming races, favorite running routes, etc, but most importantly, a calendar where I can click on a "add" button on a given date to get the aforementioned logging form to popup for entry.
Been adding content on the page through panels...
Is this the right block for me? If not, what is?
#11
i can see where this block would work for you.
i would simply create a content type with the fields that are necessary (run time in your example), and add this block on the page somewhere appropriate for the athlete to create a new node of that type and track his improvement.
as far as commenting goes you could use the core commenting functionality and track all of it with Activity or Heartbeat.