I need to ad more ingredients the given space is not enough

Comments

mitoman’s picture

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

mitoman’s picture

Category: bug » feature
mitoman’s picture

Already being discussed here actually.

http://drupal.org/node/285003

alienseer23’s picture

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.

hass’s picture

Title: Add more ingerdients » Add more ingredients
scottprive’s picture

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).

scottprive’s picture

Title: Add more ingredients » Add more ingredients, need an easier (AJAX) method
hass’s picture

Over all i think it would be best to reuse cck...

scottprive’s picture

hass - great idea. You're in charge of the Recipe CCK porting effort. :)

jvandervort’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
introfini’s picture

subscribing

jvandervort’s picture

Status: Active » Fixed

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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.