Currently in Forms 9.1 you can only add up to 3 buttons. It would be nice if there were the option (like in a repeatable table) to add additional buttons and give a label to each one. I know we can do something similar by creating a field and then evaluation the option from the field, but it would be nice to have the additional buttons.
Question
Question
Feature Request: Option to Add Additional Buttons
Answer
Forms 11 Update 3 has added support for more action buttons on user tasks.
You can see other changes of Forms 11 Update 3 from https://support.laserfiche.com/kb/1014413/list-of-changes-for-laserfiche-forms-11-update-3 and get Forms 11 Update 3 from Laserfiche 11 package https://support.laserfiche.com/kb/1014263/software-versions-and-fixes-included-in-the-laserfiche-11-download-package.
Replies
So I may have figured out a way to make this work (and possibly with any number of extra buttons) if anyone is still interested I'll happily post my code and show an example. I've currently only got one more extra button and if I wanted to get it down next to the other buttons it might take some more coding. But for now, I have a button that submits and can be set to a certain action name just the same as the 3 included buttons.
EDIT: I also wanted to add that the button is able to be referenced in the process diagram, so you can create paths from the button. If someone would like the code and examples I have just let me know so I can get it together and post it.
I would love to get the code and example if you are willing to provide them.
I sure can Andrew. So my use-case is in a payroll ticketing system. The nice part about mine is the required fields are completed on the first form and anything else is separate. So Kris' example doesn't fit my model, but he has a point none the less. Here is my write up on how I solved this issue for myself.
So the two pictures I attached illustrate what the buttons look like on the form. They aren't currently moved to the bottom, but for this use-case, I don't necessarily need them down there as they are tied to the updateable checklist below them.
The code of the custom HTML button I used is
<input type="submit" class="action-btn checkRequired Submit sendToHR buttons" name="action" aria-labelledby="action" value="Send To HR">
I only changed the "sendToHR" class to be "sendToSupervisor" on the other button. The part that determines what the button's action is, is the value="" part. The pictures also kind of illustrate that if you look at what the button says and what the fs_action value is (in case it's unknown the fs_action is the last user action).
Now my form I have done quite a bit more than just that to customize the form. But that should get you another button you can reference in the process diagram.
KEEP IN MIND: The dropdowns for the last user action will not populate the choice as it's not created by Laserfiche. So you will have to insert it with a blank value and fill it in yourself. Check out the Process Path pictures for what I mean.
If what I've posted doesn't make any sense anywhere just let me know. I'm more than happy to help out and give examples. Mine is working perfectly, so I have no doubt I can make your form work great too!
So after making that and playing around with the process. I decided to try my hand and making the buttons also act as the action buttons at the bottom of the page do. And I'm glad to say I got them working exactly like the action buttons now. The thing that's unfortunate (and also not) is the targeting of them for certain things.
The screenshot attached is the previous two extra buttons, now down next to the other action buttons. They hide and unhide depending on the page just as if they were other action buttons. Below is the code I used to add them to the button navigation div.
$('.button-wrap').append("<input type='submit' class='action-btn ellipsis Submit sendToHR buttons hidden' name='action' value='Send To HR'><br class='lf-responsive-navigation'>") $('.button-wrap').append("<input type='submit' class='action-btn ellipsis Submit sendToSupervisor buttons hidden' name='action' value='Send To Supervisor/Manager'><br class='lf-responsive-navigation'>")
The key to making them hide and unhide is setting the hidden property first. Laserfiche's system in the background adds and removes it to input fields automatically so it handles it for you.
Again, if anyone needs help understanding this just let me know. Hopefully, I help at least one person out.
Could you possibly help me add an Action Button to my form? Thank you!
Dawn
I will definitely use this
Can you give us an example of what you'd use this feature for?
You bet. If you look at the screenshot below of one our processes, you can see the HR Director task already has 3 outgoing flows which takes up the existing 3 buttons (Submit, Return for Corrections, and Needs Signature).
We would also like a 4th button called "Delete" that would take a different path from the other 3.
We have another part of the same process where Payroll receives a form. Before it gets to Payroll it goes through a number of other user tasks. We would like the ability for them to be able to send it back to any of those user tasks depending on if information is missing.
As I mentioned in the original post, I know that we can add a field to the form that could be evaluated after the form is submitted, but we have found our users prefer to have a button that says exactly what is going to happen if that button is clicked.
I need this! I have VOID, Approve, Reject, and would like to add a "SAVE FOR LATER", but can't.
An expansion on outflow/button options certainly couldn't hurt.. so +1 from me. However, I wouldn't rate it high priority because in my experience button based decision making is generally only suitable for informational/read-only based forms tasks.
If a form needs some type of interaction, the button based approach can fail due to required fields on the form not being completed. Users completing the task scroll straight to the end of the form expecting the form to submit when clicking "Delete" but if your form has required fields associated with the other button options those can't be conditionally shown or hidden without some type of interaction with the form first.
So our rule of thumb is:
- Interaction required? Evaluate using a field. (Select: Return / Approve / Edit Original / Decline)
- Read-only information? Outflow using buttons. (Actions: Return / Approve / Decline)
So as mentioned, this feature request get's my nice-to-have but not essential +1 because the second rule of thumb could certainly benefit from additional button actions.