Closed (won't fix)
Project:
Webform
Version:
7.x-3.16
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2012 at 18:56 UTC
Updated:
3 Nov 2014 at 12:50 UTC
Jump to comment: Most recent
Comments
Comment #1
rv0 commentedI guess this is out of scope of this module tbh.
Comment #2
lsolesen commentedIt should be fairly easy to add a button like that, shouldn't it, with hook_form_alter()? Maybe I did not explain properly.
1) I create my Webform Template content type
2) I add new content from the Webform Template Content type
3) I add title and description
4) I can only hit "Save"
What I wanted was the possibility to
4) Hit "Save and add fields"
5) I am redirected to the webform, so I can add some fields to my webform template
Then later I can use the template from another content type.
Comment #3
rv0 commentedI understood very well :)
Easy yes. But not something this module should do.
It might be the way you want it to work in your usecase, but that's not something thats valid for everyone.
At least in all cases I use it, people want to be redirected to the content they just created, not to the webform tab.
Comment #4
rv0 commentedcustom coding or a contrib module seems like a better place for this.
Comment #5
lsolesen commentedBut what is the point of having a webform template - if you are not adding any webform components? And I am simply asking for having two buttons so the user can decide for themselves. You had your use case, and I had mine. Who should decide how the user chooses to use the module.
Seems like a very, very small module just to add one more submit button to the node add form?
So in the bottom of the form:
Save (which works as the button does now) | Save and add fields (which directs to the webform edit page)
Comment #6
lsolesen commentedComment #7
rv0 commentedYou could make the exact same issue in the webform issue queue:
You could say then:
But what is the point of having a webform enabled content type - if you are not adding any webform components?
Btw when you say:
You are adding components by applying the template. Nothing prevents you from adding extra components afterwards using the webform tab, as thats the way webform works and has always worked. But there is no reason at all that you HAVE to add extra components, in fact, of all the sites we launched in the past months that use this module, only one site occasionally add's stuff to the webform (very specific options per individual event subscription in this case)
I'm really not convinced that it belongs in this module.
Comment #8
lsolesen commentedYou are right about webform. Maybe that should have a save and add fields button as well.
But let me ask you about your recent site.
What did you do when you created your webform templates? My guess is:
1) You off course added a title and a body description.
2) Then you hit save.
3) Then you opened up the webform tab and started adding components.
I am just proposing to save that extra click. I think admins and user expect that (when they are not used to webform, but just started using it).
For me there is no reason making a webform template without actually adding components to the form. Actually, I cannot see one single use case where you won't add components the first time you create a webform template.
If you still disagree, feel free to close this issue. Maybe we should each ask a couple of people with little knowledge about Drupal - what they expect UX-wise?
Comment #9
rv0 commentedi think you totally misunderstood the purpose of webform template module, hence this issue.
All webform template does is copy the components of existing webforms to new webforms.
there's no reason at all that you should add additional components afterwards.
You are correct though that it would be easy from UI point of view that - when you create a template - you get redirected to the /webform tab..
Comment #10
lsolesen commentedOff course. You are right. This issue should be directed to webform :) This module is only responsible for making it possible to copy. Sorry about the confusion. I will move the issue to webform.
Comment #11
quicksketchSo going back to the original question here... Webform already has this functionality for the "webform" content type. When you add a new webform node, you are immediately taken to the Webform tab on the new node so you can start adding components. If you want this behavior on other content types besides the webform type, you can do this by setting a hidden variable for "webform_node_types_primary". One way to do this is to put this code at the bottom of settings.php:
That will make both the webform content type and the some_other_type content type have this behavior. There isn't a UI option for it because explaining what a "primary type" is both difficult to explain and an unusual option for people to need.
Comment #12
rv0 commentedwow nice to know!
Comment #13
lsolesen commentedMaybe this belongs in webform template anyways? Or just put is a wont fix.
Comment #14
lsolesen commentedMaybe this belongs in webform template anyways? Or just put is a wont fix.
Comment #15
lsolesen commentedMaybe this belongs in webform template anyways? Or just put is a wont fix.
Comment #16
mdburrell commentedSimple solution, but works great. If you want to add more and at the same time retain all of the users information (anon or not) place a conditional page break that contains fields for what the item is they are requesting, then direct them to a custom confirm page. On that page place this code:
<INPUT TYPE="button" VALUE="add another" onClick="history.go(-2);">This takes the user back 2 pages (the page before the item information). It treats the new item as a separate email.
Comment #16.0
mdburrell commentedEdited after moving the issue to webform.
Comment #17
danchadwick commented7.x-3.x is only receiving critical bug fixes. Doesn't seem useful enough for webform to form_alter the node add form. I would consider a 7.x-4.x patch, however.