0

I want a page with an initial node add form (in small size), the title line and body textarea 3x20 size;

And a button "one more" with ajax call to display another form plus another button etc etc.

and of course the submit button always at the bottom.

So the question is ... which module ? :) I hardly cant find the terms for searching!

UPDATE: I want to add , this task seemed to me quite often used and modular, so I thought there would be a module for it; Now as i work through related questions and learn about ajax form api http://randyfay.com/ajax it's okay to code it for me and maybe you can give some starting points.

2

I worked on similar case. I wanted to add few nodes at one time without reloading page.

Instead I did multi value field in my content type (mysomething), but I needed to have more elements than one field. So I found field collection module, made collection and put it as multi value field of type collection. Now when I do node/add/mysomething I have collection and [Add more] button below.

Creating collection allows You to add all core field types, so in your case I would add text field working as title and body field to collection.

The other thing is, that if someone add 3 collection at once it will be consider as one mysomething node by D7 core - You should make some views to see whats inside. Another approach is to catch node creation action of type mysomething and try to split it into nodes by rules, but I didn't do that so I'm not sure if it is possible. And finally someone probably can write custom module with ajax form, where submit button will save node for each element...

I think it's nice trick with no coding (UI visual puzzle). I can write step by step config for You, if needed, but it's pretty easy.

0

The default Fields API gives you the opportunity to use fields with unlimited number of values, with widgets that already embed the functionality you're talking about, mean an 'Add more' button.

Is there any reason you don't want to use it ?

  • if I understand right, the addmore button should be defined as a field? – groovehunter Mar 1 '12 at 13:27
  • No, as a form element. If it doesn't store data, it's not a field right ? – Countzero Mar 1 '12 at 15:32
  • And store all data in the same node? Not sure if I want that. I need to try to use views on that. – groovehunter Mar 2 '12 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.