Hi,
I've discussed this issue on IRC, but haven't found any useable solutions, so I hope anyone here can assist me... :)
I have a custom node type (CCK) with several fields defined. What I want to do is to have a block on my site that shows some of the fields and let anonymous users create that node, but not see it. So.. basically... I want to display the "create node type" page (in a simple, stripped form) in a block an let it function as the "contact form" in Drupal.
My problem is now to find a snippet/solution on how to display some of the CCK fields for the user in a block. When a user has entered all the stuff he/she wants and press submit, the info is stored in the node/CCK fields, but the user is directly forwarded to a "thank you for your submission" node/page.
I've found the following article on 2bits, but it only gives me errors and I don't know how to define my fields...
http://2bits.com/articles/creating-nodes-using-mini-forms-anywhere.html
Comments
Try another approach
If it's just a submission, consider the webforms module. It will do what you want, if it's all text.
:)
...but can the webform module
...but can the webform module save to a node/CCK field? I thought the webform module saves stuff in its own way...
Nobody who know how I can do
Nobody who know how I can do this?
The only thing I need is a simple form with a title, body field and a submit/save button. Upon submission the content of the title and body is sent to a set content type and saved.
After the user has hit submit he/she is just forwarded to another node (node/7) that says thank you....
This is the closest I've come
This is the closest I've come to make the form. This gives me the submit and preview button, but how can I add the CCK fields I want/need?
Creating / editing nodes in a block
I could swear I've read about a module to allow creation / editing of nodes within a block, though I haven't installed or used such a module yet.
Might be this one: http://drupal.org/project/formblock ... or something like that. Does that look useful?
No, I tried it and it didn't
No, I tried it and it didn't allow me to choose what fields to display or not... it just rendered the whole create content type page in a block :/
I've found a lot of topics regarding this problem, but no one was ever solved...
Form Block + form_alter
I'm doing something a little similar. Using Form Block module for to move the form into a block, and alter_form to make changes to the form. A lot might hinge on your approach to hiding/displaying, simple solutions could come from css.
I looked at the 2bits article you mentioned, and it's similar to an approach working for me. So what are your errors? Can you narrow the problem down: is it altering the form, or moving it to a block, that is giving the problems? Have you installed the devel module and perhaps Form inspect ?
With Form Block, you just need form_alter and something like this (I haven't tested it well yet, but seems to be working)
Can you describe
Thanks
thanks
Thanks alot
@Drupalace, Thanks alot for your sharing, This module wich i need for create free ads site.
http://ciptareload.com