We had a case where we did not want users to be able to go all the way back to the first page of a multistep webform. This patch adds an option for each page break to control if the previous button is shown or not on the given page which I added as an exercise vs. using form_alter. Please consider it for inclusion.

Comments

quicksketch’s picture

Status: Active » Needs review

Thanks! Looks pretty simple and easy to me, moving to code needs review.

quicksketch’s picture

Status: Needs review » Closed (won't fix)

After letting this sit for a long time, I think I'm going to have to say that I don't think it should be added. Removing the back button is not something we should really be encouraging. If you'd like to hide the back button, you may do so by theming the form.

danare’s picture

Hi,
I am interested in disabling the previous button all together. Is that can be done, technically?
Thanks,
Dana.

jaskaran.nagra’s picture

Issue summary: View changes

Hi,

I think this is an important feature and should be added to the core module as the patch is really simple. And many forms require users to be not able to change previous page submissions.

+1 for this feature

Thanks,
Jask

jaskaran.nagra’s picture

StatusFileSize
new2.33 KB

Attaching Drupal 7 Webform 3 version of the patch

Cheers!

danchadwick’s picture

This can be achieved even more simply by using CSS to hide the PREV button. This doesn't stop the user from using the BACK button on the browser, or the the history. These require a much harder javascript solution.

jaskaran.nagra’s picture

True that! Dan,

But If there are multiple forms with multiple pages, and previous button is needed on some pages of some webforms and not on others, then css can get really fiddly.

Also, If a non-technical client needs to add webforms himself, then the css option would not work. I do understand that this won't work with BACK button but so would the css option.

Thanks,
Jask