I found an inconsistency caused by the default block settings. By default if you view a webform block the 'pages_block' setting is set to 0 (Redirect to the node page after the first page). However, on the block settings page this is default set to 1 (Display all pages inside block). This means that if you do not save the block, it will do one thing, while when you save the block without touching the defaults on the settings page, it will do another thing. I believe it would be best to synchronise the defaults.
I am assuming that the most popular choice 1 (Display all pages inside block), at least it's what I would want to have by default, therefore the attached patch will change the hook_block_view implementation to set 'pages_block' to 1 by default.
I think in the future it would be nice to be able to set this option in the webform options, and possibly the default as well, but for now I'll leave it at this.
Related issues
#1308806: Webform as block not staying on page after validation errors
#1337784: Selecting "No redirect" does not reload current page.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | pages_block_default-2158261-1.patch | 406 bytes | dagomar |
Comments
Comment #1
dagomar commentedComment #2
dagomar commentedComment #3
dagomar commentedComment #4
quicksketchThanks, I'm not sure how that got flipped around like that. Committed as-is to the 7.x-4.x branch. Thanks!
Comment #6
fenstratNeeds porting to 8.x-4.x.
Comment #7
fenstratCommitted and pushed 51cf1c2 to 8.x-4.x. Thanks!