When saving the webform for the first time, you are just redirected to a view of the node. Then you have to go to webform. Could you add a Save and edit form or something similar?

Comments

rv0’s picture

Status: Active » Closed (won't fix)

I guess this is out of scope of this module tbh.

lsolesen’s picture

Status: Closed (won't fix) » Active

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

rv0’s picture

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

rv0’s picture

Status: Active » Closed (won't fix)

custom coding or a contrib module seems like a better place for this.

lsolesen’s picture

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

lsolesen’s picture

Status: Closed (won't fix) » Active
rv0’s picture

You 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:

But what is the point of having a webform template - if you are not adding any webform components?

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.

lsolesen’s picture

You 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?

rv0’s picture

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

lsolesen’s picture

Project: Webform Template » Webform
Version: 7.x-1.0 » 7.x-3.16

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

quicksketch’s picture

When saving the webform for the first time, you are just redirected to a view of the node. Then you have to go to webform. Could you add a Save and edit form or something similar?

So 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:

$conf['webform_node_types_primary'] = array('webform', 'some_other_type');

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.

rv0’s picture

wow nice to know!

lsolesen’s picture

Maybe this belongs in webform template anyways? Or just put is a wont fix.

lsolesen’s picture

Maybe this belongs in webform template anyways? Or just put is a wont fix.

lsolesen’s picture

Maybe this belongs in webform template anyways? Or just put is a wont fix.

mdburrell’s picture

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

mdburrell’s picture

Issue summary: View changes

Edited after moving the issue to webform.

danchadwick’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

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