Closed (fixed)
Project:
Webform
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 May 2007 at 11:14 UTC
Updated:
16 May 2008 at 04:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gvdvenis commentedI Also DESPERATELY need this functionality. I tried to patch it myself, but this seems a daunting task, in which i didn't succeeded (yet). So PLEASE someone.. take a stab at this one...
Maybe someone already has this functionality built in their webform module.. please let me know how to crack this nut...
Comment #2
quicksketchI'm not planning on implementing this functionality into webform. Any patches to add it will be accepted.
Comment #3
gvdvenis commentedOK, But how on earth do i do this? I just don't know where to start. Maybe you can point me in the right direction. Which files/modules do i need to patch to get this working. I browsed through all the webform module files, but it seems that disabling the form fields is done somewhere in the formapi and thus probably is the standard behaviour for form viewing. Can you confirm this conclusion and maybe give me a hint where i should start? Any help is greatly appreciated. Thanks in advance and regards,
Gert v.d. Venis
Comment #4
gvdvenis commentedOk i just succeeded in having this done.Only i'm stuck with an old version.
I'm willing to provide a patch, but how to do this?
Comment #5
quicksketchCheck out the handbook page on creating patches. You'll need to download a clean copy of the version you modified, then make a diff between them. If you post the patch here I'll try to apply it to the latest version.
http://drupal.org/patch/create
Comment #6
quicksketchMarked http://drupal.org/node/152439 as duplicate.
Comment #7
gvdvenis commentedOk here is a patch. It contains changes to be made in several files. There are, however, some minor enhancements that need to be done: these include:
- customizing the confirmation message after updating an existing submission.
- After updating a submission the "go back to form" should really be "go back to submissions"
- Translation files need to be updated
- Maybe some other things you can think of...
Hope this helps.
Comment #8
quicksketchThese changes look pretty good. Could you reroll the patch with the
-uoption to make it a unified patch? Also,webform_edit()is not a good name for the edit-submission function as Drupal will think that it is an instance of hook_edit(). Use something more specific likewebform_submission_edit().Comment #9
gvdvenis commentedOk thanks for your suggestion, i changed the function name as proposed, and made a unified patch. Sorry about that faulty patch i'm new to this stuf. I left the default context set to 3; I have no idea what this means, but i hope it'll do the job this time... Regards,
Gert
P.S. the todo's remain, see my previous post for details.
Comment #10
dolittle commentedCan you explain please how to apply and test the patch?
I have installed cygwin on my local machine.
This is my first attempt to apply a patch and I get allot of alerts in cygwin.
Should I put the patch file in the webform folder and run the command from shell?
Do I need to apply it to the dev or stable version?
Any help will be appreciated.
Comment #11
dolittle commentedI accidentally changed the issue titile so changed it back.
Sorry
Comment #12
quicksketch@gvdvenis Thank so much! I'll review the patch when I have time and look at putting it in.
@dolittle http://drupal.org/patch/apply
Comment #13
gvdvenis commented@ Dolittle:
First of all you should read the documentation on this subject these locations:
- http://drupal.org/patch (General information concerning patches)
- http://drupal.org/patch/apply (Specific information on applying patches)
- http://drupal.org/node/32875 (Probably what you want to look as, as it describes how to apply patches with cygwin)
Hope this helps you out, if not, let me know. Regards
Gert
Comment #14
gvdvenis commentedSorry for the inconveinience, but it seems that the patch was corrupt. I'll hereby put up the good one.
The patch originates from the last stable version. So here is what you should do (or how i got this done).
Hope this helps...
Comment #15
chrizz commentedthis patch is great! it works most of the times. The times that i use a page break is one of those times it doesn't work.
When I want to edit a multipage form submission the whole form is presented. The form can't be submitted because there is no submit button but a next page button instead.
Comment #16
gvdvenis commentedsorry for the late reply, but i promise that i'll have a look at it as soon as i find the time for it. If you want to have a go at thisone, please do... if not... well then i'll fix it sooner or later... Regards,
Gert
Comment #17
chrizz commentedHi Gert, Here is also a little late reaction.
I'd like to give it a try but i don't know where to start. What do you think is going wrong and where do i have to start fixing this problem? thanks in advance.
Comment #18
Anonymous (not verified) commentedI have implemented the patch, but I've noticed that you can't seem to edit hidden fields. They show up fine and the text can be changed in the box, but it doesn't appear to post properly to the database. Any idea where to look to fix this?
Comment #19
Anonymous (not verified) commentedOK. I got it. Hidden field values were hard-coded. (In the form, it was using '#value' instead of '#default_value'.) Changed the following two functions:
This allows Drupal to use the POSTed value instead of the default value. Appears to work fine - no side effects noted yet - doesn't break existing functionality.
Cheers!
Comment #20
quicksketchThe patches submitted still aren't usable. But since this issue was posted we got some sweet docs on making patches: http://drupal.org/patch/create
Anyone wanting to try a re-roll, I definitely encourage them.
Comment #21
gvdvenis commentedI Don't understand... It works fine for me! Which version are you patching from?
Comment #22
gvdvenis commentedThis is strange! This seems to be another patch then i submitted! I used this one quite some time ago and it worked back then! now it seems to be altered/overwritten... I'll look into it
Comment #23
quicksketchThe patch actually replaces nearly all the code in all the .inc files, causing conflicts anywhere where a single line has been changed. The patch needs to apply against the latest CVS in the DRUPAL-5 branch.
Comment #24
kbm065 commentedWill anyone make a patch that will work? It's clearly that many people want this function.
Comment #25
aj_drupal commentedHere is the modified version of the patch submitted by gvdvenis. This works with multipage forms also.
Comment #26
quicksketchThanks aj_drupal! I'll have a look at it the next time I run through the webform issue queue.
Comment #27
gvdvenis commentedI'm very sorry i wasn't able to get the work done. Firs of all my pc crashed, and i lost all data related to my last (6 months) of drupal work... Apart from that i became the father of a beautifull daughter wich i am VERY proud of. Also as a result of that there isn't very much time left besides my other activities to keep working on this. I Want to thank aj_drupal for his effort to breeth new life into this issue and hope to find some time to review it... till then: keep up the good work guys! Regards,
Gert
Comment #28
mailleux commentedI tried the patch, with a limit of one submit per user (ever). And I get the edit form, but can't update the values because the user exceeds the limit. Even though he is updating an existing submission. Is that the intended result?
Comment #29
quicksketchI gave this patch a review and testing. Like mailleux mentioned, it wasn't possible to edit a submission if you were already at your submission limit. I added a condition for editing that prevents the check, and also prevents another email being sent to the webform email address when a submission is edited.
This looks real sharp. Because I'm going to be hitting the queue real hard the next few days and don't want the patch to go stale, I went ahead and committed to the 5.x branch. Thank you so much to gvdvenis and aj_drupal!
Comment #30
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #31
gvdvenis commentedAny change this can be ported to the 6.x version too?
Comment #32
quicksketchThis is already in the 6.x version. The Webform 2.0 version is identical between 5 and 6, other than the pagebreak functionality isn't working yet in 6.x. Please open a new ticket for any questions on this issue and leave this one closed.