So I am trying to create a Tutorial node type (similar to instructables) that has multiple pages, which are then rendered into a tabbed interface on the node page. This is what I have got so far http://robotgeek.flpvp.com/tutorials/admin/tutorial-page-reordering
If you look at the html, I've taken textarea fields and put them into a
<
ul>
The problem is, every time I go to edit the page a new blank textarea field is added, there by adding another "page" to my node. If I could figure out how to target these fields in my template.php so that they were not in the standard table wrapper, and only added another page when the "add another item" button was pressed, I'd be in a lot better shape, but I have not quite been able to find the variables I need.
I am using the Framework theme, btw.
Before trying to use a simple multiple textarea form, I had tried the paging, pagination, cck fieldgroup tabs and a couple others.
What I need is a fairly simple node form, with WYSIWYG fields, that will allow for multi step pages. Any suggestions on how to fix this or something better to try?

Comments
I am confused
Hey dang.artman -
Trying to help you out on this, but I am trying to wrap my head around the problem.
So, every time you edit 'the page' (I am assuming this is the link you provided), a new 'blank' textarea field is added? Is it added to the end of the tabs? For instance, right now you have 10 tabs, so when you edit 'the page' a new 'blank' text area tab is added to that tab, or an entire 'blank' tab is created?
I am farily new to jQuery, but it sounds like you can target the "add another item" on a click event and remove/add a class that is adding the textarea?
I might be way off, so let me know and Ill try and understand you better.
Good Luck!
Yes, every time I go to edit
Yes, every time I go to edit the page another text field is added automatically. When I create a new node there are two textfields to start with. The reason I have 10 tabs right now, is cause a new blank tab was added every time I made a change to the page, there are actually only 4 textareas that I have filled out.
Also I want to target the textarea in the template.php such that they are not wrapped in the table they are normally wrapped in and still be able to use the "add another item" button.
As far as jquery goes, I am just learning php, so that's going to be hard.
how about a totally different direction
You could create a new node for each tab, create a view, and use one of the carousel modules to display the nodes in a tabbed interface.
http://drupal.org/node/418616
I actually did try that using
I actually did try that using node reference URL and views attach. The problem was that anyone that could create that node type could click on that button that Views spit out to add another node to the view.
I suppose, if I could find an argument that hid or removed that link from anyone but the primary node author, it would be a workable solution.
Anyone have a clue on this one??
Hmm... are there user
Hmm... are there user permissions so that you could hide or remove that link from anyone but the primary node author?
That's what I am asking. I
That's what I am asking. I don't know if there is a way to hide an add node link from the node reference, views attach method.
add filter to the view?
Maybe you could add an argument and filter to the view to only display the nodes created by the author...
paging module
Why not use:
http://drupal.org/project/paging
You can create the content as one long node, with something like an hr breaking it into pages. This module will then do all of the paging for you, provided you set it up correctly. You could them the paging links that it outputs to look like tabs pretty easily. One caveat that I've found...it only works on the core 'body' field...not CCK fields.
I've used it successfully for a similar problem to what you're asking.
Quicktabs or Tabbed Panels?
Quicktabs?
http://drupal.org/project/quicktabs
Looks like something might try to do this, and there is a tabbed panel style, http://drupal.org/project/panels_tabs, but I haven't worked with panels.
I like the Paging module idea too, but with that, you'd have to hand code some CSS to make it look like tabs, right?
I have tried both the paging
I have tried both the paging and the pagination modules. While they both do the job, this form is for what should be a fairly large community site and I am not sure those are the best solutions for the masses (maybe I am being picky, I am honestly not sure).
I was really hoping for something a little cleaner even if it meant I had to do some coding, ( providing I could find the right code snippets) however the ideal conditions that I was looking for seem to be currently unavailable in Drupal at the moment. Google search after Google search seems to tell me there is no practical way to have a multiple page form that allows you to add and/or remove pages to your node at the push of a button.
I think at this point I am either going to go with a Views attach + Node reference/URL solution, ( as seen here: http://mustardseedmedia.com/podcast/episode37 )
as this gives me the ability to literally add another page, the only issue there is hiding the "add a page" button from anyone but the primary node author.
OR
use CCK fieldgroups, either with the fieldgroup tabs module or custom theming to lay the fieldgroups out the way that I want.
Thank you for all your suggestions. I guess part of learning Drupal sometimes is that you can't know what to even search for before you start trying to implement something, only to find out it can't really be done. I did my best to research the method I last tried and I don't feel like I would have found the answer without going through the pain of trying to make it work for myself. That said, I love Drupal more than any CMS I have used, I just wish that something that seems as simple as having a multi page node were easier to implement.
Take a look at node.module in
Take a look at node.module in the API:
http://api.drupal.org/api/drupal/modules--node--node.module/6
This code might be of use as well:
http://drupal.org/node/123657
http://drupal.org/node/13266
Or write a custom query/ table, to get the user id for the person that created the node.
Then for example in template.php override your current link out of the node, and replace with pseudocode:
if ($node->type == 'user_added_content') {
$get_user_id_for_this_node = code to get the node author;
if (user_access('administer') || $user->id = $get_user_id_for_this_node) {
echo '<a href="link">Add page</a>'
}
}
A bit quick off the cuff, you'll have to work out the details, but for a general idea.
And replace the tabs at the top of the node for editing nodes as well to the same like the code above?
You''d still have to find a way to block other users, from having permission to edit nodes for example through the URL path?
This search on drupal.org gets some results as well: assign nodes user
http://drupal.org/project/modules?solrsort=sis_project_release_usage%20d...
Such as the Content Access module.
Ideally you would want this to be automatic, from what I understand. So if a user signs up, creates a node, then only admin and user have permissions for that node. In essence what the forum module does, right? So maybe there is code for that in the API that can help you out as forum is also a content type?