- Issue created by @robcarr
- 🇬🇧United Kingdom robcarr Perthshire, Scotland
If a Submit button were to be inserted into the
webform_workflows_element
(/src/Element/WebformWorkflowsElement.php) what handler would be called? Any 'Update state' button should only be rendered on the 'View' display (to render in the submission Edit display would be very confusing) - 🇬🇧United Kingdom robcarr Perthshire, Scotland
I still have the same screen and missing 'Save' button despite updating to 2.0alpha3 release,
So I'm clearly making a config error somewhere:
- 🇲🇾Malaysia elaine.ong
Same here. On Submission View page, workflow does not provide a save button.
- 🇱🇧Lebanon jana_najdi01
I have the same problem
I cannot edit the workflow on the view page and i don't have a submit button I only have next and preview
is there any solution for this? - 🇫🇷France mably
Just re-tested the issue's scenario again on a fresh Drupal 11.1.7 and I definitely have the "Save" button showing:
And I can definitely save it:
Don't know what we are missing here.
- 🇱🇧Lebanon jana_najdi01
This in the edit section
It should also appear in the view section since we enabled: Allow changing the workflow state from the "view submission" page
which is not working, I can see the field but it is not editable - Merge request !30Issue #3507158 by mably, robcarr, jana_najdi01, elaine.ong: Unable to update state on Webform Submission view form → (Merged) created by mably
- 🇬🇧United Kingdom robcarr Perthshire, Scotland
I've applied the MR - thanks so much @mably
The submit button is now rendered on the Webform View display. I've done a few manual tests and all seems to work fine, but would be good if someone else could test before RTBC
It might make the form more intuitive by altering the default "Save workflow" button (line 311) to either "Save state change", "Save transition" or make the button text configurable. Using either the word 'State' or 'Transition' makes it consistent with the terminology in the Webform > Build > Webform workflows element config.
- 🇫🇷France mably
@robcarr thanks for your feedback.
May be you can create a new issue for the button wording.
I'll merge this issue as soon as we get another positive review.
- 🇫🇷France mably
@jana_najdi01 looks like a different problem as the workflow fields are not displayed at all on your screenshot.
- 🇱🇧Lebanon jana_najdi01
There is availble transition and as i mentioned before that it is not displayed as dropdown and i cannot modify it or save it
- 🇫🇷France mably
@jana_najdi01 could you post a screenshot of the same submission in edit mode?
- 🇬🇧United Kingdom robcarr Perthshire, Scotland
@jana_najdi01 check your config in Webform > Build > Webform workflows element and make sure the Allow changing the workflow state from the "view submission" page toggle is set.
Sample screenshot of 'View submission" display
Note that the 'Save workflow' button [using the MR] is only visible on the View display of the submission. It's not rendered on the Edit display of the submission - which is expected behaviour.
- 🇫🇷France mably
@jana_najdi01 I don't see the "Save" button on your edit submission screenshot, it should be present.
It would also be interesting to see if you have some transitions available in that select control.
- 🇱🇧Lebanon jana_najdi01
It is enabled and there is a submit button in the webform
- 🇫🇷France mably
@jana_najdi01 could you provide a full repeatable scenario from a fresh Drupal 11 install ?
Otherwise we won't be able to help much.
Your problem is most probably not related to this current issue.
- 🇱🇧Lebanon jana_najdi01
Okay so I removed the workflow from the wizard page and I put it on the level of the submit button
Now i can edit it but there's no save button only next and previous
any idea? - 🇱🇧Lebanon jana_najdi01
is there any update on this? I am able now to edit the worklfow but there's no save button
- 🇫🇷France mably
@jana_najdi01 no update because we cannot reproduce the problem your are facing.
Please provide the detailed steps to reproduce your bug from a fresh Drupal 11 instance.
- 🇱🇧Lebanon jana_najdi01
I am on drupal 10 might this be the problem?
Enable Modules:
Webform
Webform UI
Webform Node
Workflow
Webform WorkflowCreate a Webform:
Add fields split across multiple wizard pages:
Page 1: Student Info
Page 2: Uploaded Documents
Page 3: Signature
Workflow State
SubmitAttach Workflow:
Create a workflow: e.g., DSE Workflow with states: delivered, assigned, under review, completed
Configure transitions and assign it to Webform submissions
Submit the Form as a normal user.View/Edit the Submission:
Go to Webform Results > Submissions
Click on View the submissionBug Behavior
While viewing a submission:
You can navigate pages using Next and Previous (but the whole webform is displayed as a view in one page so these next and previous are useless)
You can update the workflow
But you do NOT see a Save or Submit button on the final page - 🇫🇷France mably
Ok, it just look like it's currently not compatible with multipage webforms.
Will have to investigate further.
- 🇫🇷France mably
Hi @jana_najdi01, could you give another try to this issue's MR?
- 🇫🇷France mably
@jana_najdi01, the multipage bug should be fixed, could you give it a try?
@robcarr would you mind verifying that the fix doesn't introduce any regression on your side?
- 🇱🇧Lebanon jana_najdi01
@mably this merge request is causing a problem on the view submission. It is taking an eternity to load and ending up causing a 504 error
- 🇫🇷France mably
Any control hierarchy in your webform that could create a loop when we are recursively searching for worflow elements inside the webform?
Any other special complex elements?
By reading the MR's code, do you see any part of the code that could cause that timeout?
My test form has only two pages, will try to add a third one see if it makes any difference.
- 🇱🇧Lebanon jana_najdi01
My webform is almost 11 pages and it contains lots of conditional fields depending one on another
and i guess loading the whole edit form in the view is heavy - 🇫🇷France mably
I have added a functional test checking that the "Save workflow" button is properly displayed on a multipage webform view:
@jana_najdi01 more info is needed if you want me to investigate further.
Your bug is probably related to something specific to your webform.
- 🇱🇧Lebanon jana_najdi01
let me know what info can help you so we can debug further
thank you - 🇫🇷France mably
As always: the simplest test scenario from a fresh Drupal instance allowing to reproduce the bug.
It there is nothing confidential, you can post the yaml configuration file of your webform eventually.
- 🇫🇷France mably
Try to rebuild your webform from scratch to identify the page or element that causes the problem.