Allow back and next buttons to customised

marcingy - April 1, 2008 - 22:06
Project:Webform
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

This patch allows the text on the back and next buttons to be customised as per the submit button.

AttachmentSize
webform_back_next.patch5.81 KB

#1

quicksketch - April 2, 2008 - 03:49
Status:needs review» needs work

I've thought about adding something like this before but I haven't been able to get around to it. I think it'd be more appropriate to add these options to the pagebreak component rather than as properties of the entire webform. That way you could make a buttons for example like "Step 1. Personal Information" and "Step 3. Specific requests". I'd love to include this functionality though!

Also, the patch has a few minor spacing issues.

#2

marcingy - April 2, 2008 - 20:46
Status:needs work» needs review

Spacing corrected and changed update no in install to reflect new naming.

I like the idea of the page break stuff but I don't have requirement for doing that piece of work.

Also you shouldn't have to set the label on a per page break basis if you want the same labelling pre-page.

Maybe the approach should be to allow form level configuration (this patch) and then allow for breaks to override the text when it has been set at a break level (new patch)

AttachmentSize
webform_back_nextv2.patch 5.88 KB

#3

quicksketch - April 3, 2008 - 00:02
Status:needs review» needs work

I'd really prefer this be a component level feature rather than for the entire form. Having "global" and "local" configuration options are confusing and unpredictable in their behavior. If you need to use the same labels across several page breaks, webform provides the 'clone' feature for components. I won't commit this as a webform level feature.

#4

madjoe - July 8, 2008 - 12:36

Can you suggest any other way of implementation of this feature within a webform?
I find this feature very useful.

#5

isaac.niebeling - July 23, 2008 - 14:43

Hey all -

For my use, it's OK if all the Previous & Next buttons are the same--I've only got 2 steps, so there's only one Next. Two questions:

1. Will this patch work for that use (understanding that it would be better if it worked like quicksketch describes)?
2. Why won't just using $form['next']['#value'] = 'Send'; work? I'm guessing webform is looking for the specific value.

Thanks,

Isaac

#6

quicksketch - July 23, 2008 - 15:23
Version:5.x-2.0-beta2» 5.x-2.1.2
Assigned to:marcingy» Anonymous

Currently you can't simply change the value of the buttons because Webform specifically looks for the words "Previous" and "Next" as the values. Since there are two buttons on the page, Webform needs to be able to associate the value with what action to take.

The patch worked fine as described when it was submitted. It might be out of date though now and not apply to the current code.

#7

isaac.niebeling - July 23, 2008 - 18:51

I had to patch the patch a little bit--looks like some of the line numbers had changed, so part of it didn't apply quite right, but it's all working the way I need now.

Thanks for such a great module.

Isaac

#8

sampeckham - September 23, 2008 - 09:50

Hi I was just searching to see if this was possible in Webform and found this thread.

Any chance this has progressed since July? Also, I'm using D6 and I like your idea quicksketch about applying the option to Pagebreak (it's the first place I checked when wanting to do it), is this feature being considered or added or is too low priority at the moment?

If not, can you suggest a temporary alternative (I only need to customize it in one form at the moment), and am happy to even apply a hard coded solution on this basis.

Thanks

S

#9

quicksketch - September 24, 2008 - 00:41

I'm still all-for adding labels in the pagebreak component, however, I don't have time to work on this. If patches can be made for both Drupal 5 and 6 versions, I'd be happy to add the functionality.

#10

jorisx - November 24, 2008 - 22:30

Is this patch still working for the latest webform release 6.x-2.3?

I need to change the next en prev. button names on a site, what's the best way to fix this ?

or should I use Multiform? but that's not released for 6 yet ...

#11

madjoe - November 25, 2008 - 01:36

Don't use this patch. Try to use jQuery within a markup to do that.
If you want images instead of standard buttons, you could write your text on an image and use CSS only!

#12

tim.plunkett - September 2, 2009 - 18:03
Version:5.x-2.1.2» 6.x-2.x-dev

Any progress on this?

After Drupalcon, of course. Just bringing it back into the light.

#13

miro_dietiker - September 25, 2009 - 22:01

BTW We've used the localization to translate and thus change the button text globally. (OK, that's no per-webform setting... but still more custom.)
You even can do this for english by translating the drupal system into a custom english language set. We always do that to customize default text.
So what we best need is e.g. a option to the separators to rename the text button... Page by page... But this would be needed to be added to both PREV and NEXT buttons depending on what's next or prev. Would this be more what you like?

 
 

Drupal is a registered trademark of Dries Buytaert.