Closed (fixed)
Project:
Webform
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
22 Aug 2005 at 14:29 UTC
Updated:
25 Apr 2006 at 06:30 UTC
Jump to comment: Most recent file
Please make Webform CVS-HEAD compatible.
example:
check_output() has to be renamed to check_markup()
ciao Tobias Maier
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | webform_0.zip | 33.54 KB | quicksketch |
| #23 | webform.zip | 33.4 KB | quicksketch |
| #3 | webform_2.module | 61.63 KB | php_coder2114 |
Comments
Comment #1
ullgren commentedThis will be done as soon as code freeze is done for 4.7.
Comment #2
bomarmonk commentedAny progress? Just checking on all the wonderful modules that I need to work for 4.7. Thanks for any update on the status of webform.
Comment #3
php_coder2114 commentedHello all....I tried upgrading the module and I am getting a segmentation fault and I can't tell figure out what's causing it.
I have attached it. Please let me know if you figure out the problem.
Thanks,
php coder
Comment #4
ullgren commentedI'm currently working on making it head compliant and have some problems of another sort.
It seems the new form api doesn't like it when you try to have more than one form on the same page (as is the case when you preview a webform module.
Maybe I should check it in to the sanbox so you can have a look at it.
Comment #5
php_coder2114 commentedI found out what I was doing wrong. webform_form needs to return $form array(). I would be happy to take a look at the code. By the sandbox do you mean the CVS?
Comment #6
ullgren commentedYes I mean the sandbox area in the CVS.
I've checked in my work so far into here ....
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/ullgren/
The problem is when I try to preview a form. It seems that the node validation is done on all forms when they are "rendered" and there is a $_POST['edit'] variable set. Probably has something to do with the form_id field that is added twice when I have two forms on the same page (which is true in preview "mode").
Comment #7
php_coder2114 commentedPerhaps making the component description not required and adding the following to customize the validation.
function webform_node_form_validate($form_id, $form_values) {
if (is_array($form_values['webformcomponents'])) {
foreach ($form_values['webformcomponents'] as $id => $component) {
// validate here
}
}
}
I only saw one form id in the post.
Comment #8
php_coder2114 commentedAre you still working on a 4.7 compatible version?
Comment #9
ullgren commentedYes ... but real life came in the way =)
I still have the same problems with previewing the form.
If you wanna help please send patches towards he version in the sandbox (this is the place where I do the work now).
I will try to get some time off to today and have a look at it again.
Comment #10
php_coder2114 commentedMaybe looking at the flexinode module may give you some ideas.
Comment #11
Patrick Nelson commentedI just wondered how this was going. I'm trying the version in ullgren's sandbox and, apart from the Preview issue that you mention in this post, there is also another problem in that values when creating a webform are not being saved - for example, roles that are selected to be able to use the webform: check certain roles and submit the webform, then go back in to edit it and the previously checked roles are blank again.
Any ideas anyone? It seems this module is close to 4.7-ready if we can just get these few problems sorted out.
Regards
Patrick
Comment #12
pfaocleTweak, lines 325 onwards. Replace:
with:
if ( is_array($roles) && !empty($roles)) {$form['webform']['roles'] = array(
'#type' => 'checkboxes',
'#title' => t('Use access'),
'#default_value' => $node->roles,
'#options' => $roles,
'#description' => t('Roles that should be able to submit data using this form.'),
);
}
?>
I'm testing the module out on a 4.7.0-beta4 site. More patches may follow ;)
Comment #13
pfaocleBah. Replace it with:
Comment #14
Patrick Nelson commentedleafish-paul,
Do these updates make it 4.7-compatible? I haven't a site to test on at the moment (server is in hospital) and just wondered...
Regards
Patrick
Comment #15
aries commentedI'm using the sandbox version.
There's something wrong around line 364, there's no $node->webformcomponents but $node->webformcomponents_name, $node->webformcomponents_type etc.
Comment #16
Patrick Nelson commentedYes, this module still ISN'T 4.7 compatible.
Anyone know any other modules that let you create forms?
Comment #17
jorditr commentedIn fact the good thing on that module regarding other form modules is how easy is to keep track on the answers with webform, something that any other one is capable of. In fact, I'm eager to finally see the 4.7 version of webform since it's a keypoint for corporate Drupal use. I wish I could hack it to work...
Comment #18
pfaocleCurrently neither the sandbox version, or HEAD version are working with 4.7.0-beta4 or HEAD of Drupal core. Its a module we require for several sites, so I should be able to take a look some time next week.
@Patrick Nelson: we've resorted to the core contact form for a few sites which suffices, even though its a lot simpler. There's no support for user-defined fields, for example. There is the Feedback module which has a 4.7.0 release?
Comment #19
ullgren commentedIt would be great if somebody could help me with this.
I'm in a dead end with how to get the new form api to work.
It seems that there are problems when two forms exist on the same page (as is the case with preview:ing the webform).
I'm really sorry that I haven't had more time to devote to this problem.
I also would like the 4.7 version of webform to be more (sub-)moduler so a administrator can write and add there own components and/or post-submission checks.
Comment #20
egfrith commentedI'm just learning about forms, so I don't suppose I'll be much use. However, if the problem is with getting a page to display two forms, I have managed to do it (see sample module below). doubleform_page_submit() should be able to do different things depending on whether its $form_id argument is "simple_form" or "preview" form. I say "should", because doubleform_page_submit() doesn't seem to get called on when any of the buttons with of type "submit" are pressed - even when I get rid of the second form; I must be making some very obvious and silly error. Anyway, perhaps this will be of some use.
Comment #21
egfrith commentedGot this simple double form example working now. What was wrong with the previous example was that the first argument of drupal_get_form wasn't matched to the name of the _submit functions. There needs to be one _sumit function for each form. The full code is below:
Comment #22
quicksketchI've used webform in every one of my 4.6 sites, and I agree that this is a very useful module. Very customizable and makes putting forms inside a simple node really easy.
Ullgren, I'd like to help out with the conversion to 4.7. It looks like there's still quite a bit of work to be done moving this module to 4.7 since this entire module IS forms. Some things about moving to the new API don't look like straight-forward tasks. For instance the issue of two forms one page. It is possible using the method egfrith used, but you can't use this method to over-ride the hook_form method (since it returns a single form object, not the rendered html). I'm looking at creating a new menu item for editing the form fields using egfrith's method, but leaving the hook_form method for editing the other properties of the node. Here's an example of the top of a webform page:
So the "normal" node settings (such as comment settings, authoring info, etc) would be under the settings tab and the webform specific settings (the listing of current fields and adding new ones) would be under edit. It's either this method or finding a layout that only uses one form.
I'll post what I've been working on to a sandbox soon. I just wanted to let people know that I'm working on something so we don't end up with wasted work.
Comment #23
quicksketchWorking 4.7 Module
I've made significant updates to the webform module. I haven't put it all together in a patch (it'd be pretty serious!) but I've attached a complete webform module package that can be used to upgrade or create new webforms in 4.7.
This module is NOT ready to be used on a large scale. I've posted it here for ullgren to have a look at and for other interested developers to continue tweaking. I will likely continue updating the module to tidy things up further.
Here's a list of changes:
Not all the changes are necessarily for the better. I liked having the components on the same page as the rest of the node settings for instance. But are currently make-do until there are enough developers that understand the form API (and we get some decent documentation on it, geez).
Download it and try it out. Let me know what you think (and problems you have).
Comment #24
quicksketchAfter some more work with the module I merged the normal node "edit" tab with my "edit fields" tab which seemed like a bad idea in the beginning. Well, now it's all back together again and this module operates almost identical to the 4.6 version, but still has some serious changes to the way its working under the hood.
Anyone who's interested should check out this new version. You can also check for future revisions at my sandbox http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/quicksketch/.
Comment #25
guckie commentedHooray for YOU, quicksketch!! Your contribution of this updated module for 4.7 is much appreciated!
I'm not a coder, so all I can do is offer up my observations on it
Possible issues:
(I'm using Firefox - don't know if that's relevant.)
A couple of feature suggestions:
That's all I've got. All-in-all, this module is working very smoothly with my 4.7b6 installation - THANKS!!
Comment #26
guckie commentedOops! Here are a couple more issue items...
Still love this module =) Thanks again!
Comment #27
quicksketchThanks for the input guckie. I'm working on fixing these problems now. Let me know of any more issues!
Comment #28
quicksketchI made a lot of updates to the module today. Here's the CVS comments:
Fault Fixes:
* Edit more than one component without saving
* Mandatory checkbox stays checked
* Filtering of user entered variables (%server, etc.). Make sure you get the lates webform.inc file also.
* Default values containing apostrophes
* Delete submission records (first they give you theme_confirm and then they take it away :P)
Features:
* Better arrangement of fields when customizing a component
* "Disabled" checkbox allows textfields and textarea to be disabled from input
guckie:
The disabled input was a piece of cake, though I think the user roles thing might be a little bit much. I think it falls outside the scope of this module's description. You could probably still manage this by sending the user to a confirmation page would would perform more actions (like analyzing the entered data), but this would all have to be outside of the module (i.e. custom code).
Thanks again for your input. Let me know of any more problems. Grab the latest file from my sandbox.
Comment #29
guckie commentedSweeeeet!! quicksketch, this works great! Amazing!
Yeah, I figured as much about the tie-to-user-role thing. I'm going to see if I can dredge up some code to check a specific form's table for the existence of a username & change user role on cron - or something. Heck, I honestly wasn't even expecting action on the 'disabled input' checkbox... so thank you!
I'm blown away that you got all these other little things polished today - nice work! =)
Comment #30
ullgren commentedNice work!
However I still get the same error I got when I started the porting job.
When I create a new webform node add a component and press preview (not submit)
The field "Authored on" is marked red (it contains a valid date/time) and the webform component dissapears and NO form preview appears.
Comment #31
quicksketchYes it looks like a few bugs remain in this version of webform. I committed changes that enable the preview again and fix a few other problems. I've never seen the problem with a disappearing submit date though. See if this latest version fixes the problem.
Ullgren and I have worked together to add the changes made to the HEAD version of webform in CVS, so don't look for changes in my sandbox anymore! Look here instead: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/webform/.
Comment #32
quicksketchThe CVS version has been tagged for a 4.7 release. The module is now listed under the 4.7 contributions, though the latest release still is marked for 4.6. I don't know if this will change on its own when 4.7 goes gold or what, but I think its important to assure users that webform works with 4.7, so I'm marking this as fixed.
Comment #33
(not verified) commented