Posted by thakorek on September 3, 2008 at 9:08pm
Jump to:
| Project: | Recipe |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I need to ad more ingredients the given space is not enough
Comments
#1
I also would like to be able to add more ingredients. Maybe an add more button. I'd be happy to help in anyway. I have no coding skills, but I'd be happy to test anything out.
Thanks all
#2
#3
Already being discussed here actually.
http://drupal.org/node/285003
#4
1) open the recipe.module filer with your favorite text editor.
2)in D5 go to line 260 which reads: for ($i = $num_ingredients; $i < $num_ingredients+10; $i++) {
in D6 go to line 262 which reads: for ($i = $num_ingredients; $i < $num_ingredients+10; $i++) {
3)change that number 10 to something bigger, however many lines you want. Save. Enjoy.
#5
#285003: Can't get ingredient count above 10 has been marked as duplicate
#6
Merging in the the consensus from the original ticket #285003, looks like the issues are:
1) Some people do not realize you can add more than 10 ingredients.
In fact you can, but to "add 10 more" you have to save the recipe then edit it again..
At least to help the people who do not realize this is possible, this feature/process/workaround could be made more clear.
2) People want an AJAX method, triggered by a link/button "Add more Ingredients".
Clicking that will immediately populate the page with N additional empty ingredient items.
I do not know JQuery UI and I have my hands full at the moment, so someone needs to step in with a patch.
I suppose this would be JQuery or jQuery UI attaching new fields via DOM manipulation (should be pretty easy for someone more familiar with jQuery).
#7
#8
Over all i think it would be best to reuse cck...
#9
hass - great idea. You're in charge of the Recipe CCK porting effort. :)
#10
#11
subscribing
#12
Added an add more ingredients button using the form rebuilt technique, and removed the default "10 extra". New recipes will get 5 empties and existing recipes will have actual ingredients only. I'm still looking at the ajax-ahah technique, but that would only be icing as this functionality looks like it works well.
#13
Automatically closed -- issue fixed for 2 weeks with no activity.