Mistakes happen. Sometimes, a form gets submitted and an approver catches something that needs fixing—maybe a mistyped budget code or other small errors. Rather than fully rejecting the submission and forcing the submitter to start over, you can create a workflow that loops the submission back to an earlier step for changes.
Sounds like a win, right? It might seem a bit complex at first, but designing a workflow that allows for corrections will save time for both the submitter and the approvers. Let’s walk through the steps to build this in an example form.
Here's the workflow as it is now:
Add Key Components to your Form
Before we set up the workflow, you’ll need to add a few key components to your form layout: Radio buttons, Actions, and Text fields.
Add a Radio Button to Choose the Path
Drag a Radio Button component onto your form layout and place it where you'd like the approver to have these options for the next action. Make the column width at least 6.
Label the new Radio Button "Next Action" (or something else you'd like!) and add Approve, Return for Changes, and Reject as the options.
Change the ID to be more descriptive. Let's use nextAction instead of the default ID.
Scroll to the ID field in the right-side Properties Panel to edit the ID.
Finally, let's ensure this Radio Button only appears on the Approval Step (which has an ID of approvalStep, by the way). Go to Visibility, select the Radio Button, hide it on the Start Step and make it editable on the Approval Step.
Add Action Buttons
Depending on the step and what the approver selects, you’ll want to show the right button for the next action. This is where the Action Buttons component comes in. You’ll use display logic and the currentStep() helper to control which button shows up.
Add Two More Action Buttons
Drag two sets of additional Action Buttons onto your form layout underneath the existing set of Action Buttons. There will be a total of three sets of Action Buttons: the first will be for the Start Step (a typical Submit button). The second two will be for approving and rejecting based upon our new Next Action radio button.
Specify Button Types
On the second set of Action Buttons, deselect Reject. This will serve as our Approve button when "Approve" is selected from the Next Action radio button.
And similarly, on the third set of Action Buttons, deselect Submit. This will serve as our rejection button when either "Return for Changes" or "Reject" is selected from the Next Action radio button.
Customize Button Text
On the third Action Button, let's use the value of the Next Action radio button to populate the text of the reject button. Click in the Reject Text input on the Properties panel and type ##nextAction##. The double-hashtags indicate a merged field value, so whichever option the approver choose from Next Action will be the text that will appear in the reject button. Handy trick!
For the second Action Button, let's simply enter "Approve" in the Submit Text input.
Make the Approve Button Appear When Needed
Next, on the Approve Button (second button set), select Display Logic. We'll write a short expression to ensure that this button only appears on the approvalStep and when the nextAction selection is Approve.
Quick note: ensure that your Approval Step either has an ID of approvalStep, or that you are using the ID of the workflow step that’s relevant to your workflow. To find/edit the workflow step ID, enter the Code Editor using the upper-right switch and select the Workflow tab. There, you can view and adjust the step ID references. If you get stuck, contact Droplet Support.
Make the Rejection Button Appear When Needed
Let's do something similar for the Rejection Button. Click on that button set and select Display Logic. We'll write a short expression to ensure that this button only appears on the approvalStep, when nextAction has a value, and when that value isn't Approve.
Hide Other Action Buttons when on the Approval Step
And finally, we want to ensure that the regular Action Buttons (the first set) are hidden while a submission is on the Approval Step, since we now have two new flashy set of buttons that will display based on how the approver is responding to the submission.
Let's open the first set of Action Buttons and select Display Logic. We'll use an expression to only show this set of buttons when the current workflow step is not approvalStep:
Save your progress by clicking the Save button in the upper-right corner.
We've got a functioning Next Action system now!
Add a Reason Block
When a submission is sent back for corrections, it’s helpful to give the submitter clear feedback. You can do this by adding a Corrections Reason section that appears only when needed.
Here’s how to set this up: when the Reject button is pressed, anything typed in the Reason for Action window is saved in a value with the ID _reason. We’ll display these notes at the top of the form when it’s returned for corrections, so the submitter knows exactly what needs to be changed.
Drag on a Tile component toward the top of your form — wherever you'd like for this message to appear. Set the width to 12 columns and a background color on the tile that fits your form's aesthetic. We're going with a faint red color.
Add a Formatted Text component to the tile and set its width to 12. Then, use this as the text content:
##_reason##
The Reason for Action text that the approver included when they sent this submission back will be populated in place of ##_reason##.
Set the Display Logic on the Tile to only appear when there is a value in _reason:
Connect the Workflow Pathway
Now it’s time to connect everything. Flip to the Workflow Editor for this next little piece:
In the Workflow Editor, draw rejection pathways from the Approval Step to the Start Step and to the Rejected Step.
We need to instruct the workflow when it should return to the Start Step and when it should proceed to Rejected. Click on the Approval Step card and click Edit Details.
Notice that there are two Rejection Paths. Let's add a condition to the Start Step Rejection Path, so that when the Next Action is "Return for Changes", the submission will flow back to the Start Step:
Next, return to the Workflow to ensure that the Submitter is assigned on the Start Step.
Last piece! By default, the original submitter will get a generic email when their submission is sent back. Let’s take that up a notch! Customize the email to include the rejection reason, so they know what to correct without needing to open the form first.
Click on the Start Step card and then the notifications icon in the toolbar above the step. Customize the default assignee notification, including the subject line and message body.
Perhaps the message can say something like this:
##_reason##
Click here to make these changes and resubmit.
Test your Workflow
Now that you’ve set up corrections routing, give it a test! Publish your form, submit it, and have one of your approvers choose the option to send the submission for corrections. This will ensure everything is working smoothly, from assignments to notifications.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article