By netron on
on a custom form, i'd like to have "add more" functionality apply to two or more fields.
such a thing exists in the poll module - in node/add/poll - where you can add "choice" and "vote count" simultaneously by hitting the "add another choice" button.
is there a guide somewhere on how you can implement this in a custom form of your own?
Comments
i came across this guide
i came across this guide here
http://www.nicklewis.org/node/967
but there seems to be elements in the solution that are missing.
is there anyone out there who has experience of having more than one field with an Ahah "add more" button, so that the two fields (or more) obtain a new line in a form in response to that "add more" button?
any guides, tutorials on how to implement it in your custom module?
i guess i must be the only
i guess i must be the only person in drupal doing this.
is there *anyone* out there who has managed to implement ahah multi-field rows in a custom form?
some reading .... some of
some reading .... some of this is for D5, so it might not apply to D6. but still, its useful reading, regarding CCK
http://www.lullabot.com/articles/an_introduction_to_the_content_construc...
http://www.darcynorman.net/2008/05/02/creating-a-custom-compound-field-f...
http://drupal.org/node/206980
maybe i'm approaching this
maybe i'm approaching this the wrong way... in D6 is it possible to group cck fields together in a group, so that they act as one when you hit the "add another" button?
can anyone give us some
can anyone give us some pointers on how to do this? i'm due to show drupal to a client this week, and this "add another" functionality would wow the client over , and get another convert to drupal.
drupal version is 6.x
bump. can anyone give us
bump.
can anyone give us some pointers?
Looking for the same
Looking for the same solution, netron! Did you find out how to do this?
My web production and development blog. I do Drupal development.
dont' your cck fields allow for 'unlimited' or multiple values?
in d6, my cck fields show an option to add more - unlimited (an 'add another' button) or a specific number (1 to 10)
you could simply add a cck field as the 'body' if that's what you're after and suppress the body (the default' body' ) by leaving that field blank - that will give you a subject field and a cck field (e.g. a multiline text field) with an 'unlimited' option - so what a user sees feels just like 'title and body' except that body is a cck field and they click 'add another' to add another body field and so on and so on
is this what you mean?
........................................................................
i love to waste time: http://twitter.com/passingnotes
Content Multigroup
You can create groups of fields and have them repeat with an Add More button using the new Content Multigroup module the CCK folk are developing at the moment. It's not completely ready for use on live sites yet, but it has the foundations of what you are looking for. Check the linked thread for the lowdown.