What's the best way to change "Next Page >" button on multi page forms?

I've created a huge form, but I'd like to change the value of that button for each page separately (including the last submit button). I tried to hack the module directly (by adding switch ($page_num) {...}), but no luck.

Comments

quicksketch’s picture

Status: Active » Closed (duplicate)

This is currently not possible, since Webform needs to know the names of the buttons when handling multi-page forms (so you can't just form_alter it). It's currently a feature request with a patch that needs work here: http://drupal.org/node/241523

jazzitup’s picture

Category: support » feature

Thanks for a quick reply.. that patch helped me a lot, but I think this feature would be quite reasonable "per page basis" too.
In other way, I don't see the point of labeling page breaks inside of a webform... we could use those pagebreak values as a custom name for the next page, and also a "Next Page >" and "< Previous Page" button values. If those values are empty, then use the default. It's just an idea... here's the example:

fieldset1
field1
field2
field3
pagebreak: STEP 1
fieldset2
field4
field5
pagebreak: STEP 2
field6
field7

Page 1 buttons: (STEP 1 »)
Page 2 buttons: (« PREVIOUS PAGE) (STEP 2 »)
Page 3 buttons: (« STEP 1) (SUBMIT)