Closed (fixed)
Project:
Webform Add More
Version:
7.x-1.01
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2012 at 19:52 UTC
Updated:
12 Mar 2013 at 05:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
shawn_smiley commentedHere is the patch.
Comment #2
cmspagnola commentedShawn,
This patch almost perfectly fixes an issue I was having in trying to have a form with two separate add more fieldsets. The issue I'm still having, though, is that deleting fields doesn't work as it should. I tried applying many of the patches on this forum to fix this issue (along with the ones that offer a remove button for removing previously added fields), but I'm unable to apply both your patch and those patches successfully given that they edit much of the same areas and my js and php skills are limited.
Is there any way you could include the patche found here: Remove Option or something similar?
If not, no worries, but I figured it wouldn't hurt to ask.
Thanks for your time,
Corinne
Comment #3
chertzogI found that there was a problem selecting the parent fieldsets with multiple sets of "add more" fieldsets.
In
Drupal.settings.webform_addmore.collectionsneeds to be replaced with:
As for the remove option. I am working on it.
Comment #4
chertzogHere is a patch that is applied against the current 7.x dev branch. Other than the core declaration, i dont think there is anything that is 7.x specific, so it may not apply cleanly to the 6.x version, but it could be applied manually without to much effort.
It includes most of the other patches that have been submitted for this module to get it working in a somewhat suitable manner.
It includes the ability to have nested fieldsets, multiple fieldsets per page, and adds a remove option.
Comment #5
cmspagnola commentedThis worked fantastically. Thank you very much for what you created. The only issue that seems to exist is when the row weights are changed for an item. An error occurrs and the item is no longer selected as an add more fieldset. This issue is by no means a major one, and is one I can deal with if you don't have time to fix it/don't feel the urge, but I wanted you to know it existed.
Thank you again for all your help.
Comment #6
czigor commented#4 works on 7, thanks a lot!
Comment #7
DrupalDan commentedI got an error when applying the patch. Hope the screenshot makes it easy to identify the cause of it. Thanks
Comment #8
richsky commentedRemove option does'nt unset the fields vars in the fieldset....
Comment #9
castawaybcn commentedpatch in #4 applied to 7.01 as czigor suggested does not seem to work in my case on a clean d7 installation.
I am getting this errors while viewing the webform page:
And no add more button shows up.
Comment #10
czigor commentedYou need to set the addmore and delete button label at the webform addmore config page to make the notices go away.
Comment #11
castawaybcn commentedthanks for getting back with this czigor, perhaps I am doing something wrong here, but after going to WebForm advanced settings and setting the values for "add more button text" & "delete button text" I get this error:
The error message dissapears on refresh though.
However, when I visit my webform (two fieldsets with the add more option enabled, contained in another fieldset) the behaviour is a bit odd, here's what happens:
Comment #12
CSoft commentedThanks! But it is necessary also that during removal of fieldset its fields were cleared.
For example:
shownFieldsets.filter(':last').hide();=>
shownFieldsets.filter(':last').hide().find(':input').val('');Comment #13
jonfrancisskydiver commentedIn the conditional right below
var collections = Drupal.settings.webform_addmore.collections;I was getting an error saying that collections was undefined. It appears that Drupal.settings.webform_addmore only contains an array object of fieldsets. So my quick fix was:
This seemed to work well. What I changed was adding the test to see if collections was undefined. If it was, then I set collections to an empty array which allowed the push method to exist.
I did add a few other patches manually, perhaps one of them was messing the javascript up. I hope this helps someone.
Jonathan
Comment #14
michaellander commentedAttached is a patch that fixes the save issue when rearranging fields. It will probably fix node clone issues as well.
The patch should be applied after the patch in comment #4:
#1696868-4: Support having multiple add more fields on a form
I wrote it pretty quickly, so please test it before putting it on a production site, but it's pretty straight forward so I don't expect any issues.
Comment #15
chertzogI finally got some time to update this module. Most of the outstanding issues have been addressed.
http://drupalcode.org/project/webform_addmore.git/commit/64920f2
Comment #16
michaellander commentedThanks chertzog! Would you consider checking out the patch I posted above? It should fix the issue with the addmore setting becoming unchecked if you rearrange the fields and possibly the node clone issue as well.
Comment #17
chertzogI believe i included your patch in the update. I had included most of the patches that were needed to get this module working in any sort of fashion.
Comment #18.0
(not verified) commentedAdded note about dependency on another patch.