You are viewing limited content. For full access, please sign in.

Question

Question

Hide Discard draft button

asked on September 30

We have a very large form that we expect will take one to two collaborative hours to complete and would like to use the Save Draft feature of Laserfiche forms as the primary mechanism to save the form during the collaboration phase, however we would like to disable or hide the Discard Draft button so people can't accidently delete one to two hours of work.  I've seen some code floating around for Hiding the Discard Draft button in Classic forms, and have tried a number of things with CSS and JavaScript in modern forms without impact. I was wondering if anyone has figured out how to hide or disable the discard draft button with modern Forms Layout Designer. 

I plan to add a Save button if I can't hide or disable the Discard draft button, and remove the

Save Draft functionality.

Appreciate any suggestions. 

0 0

Replies

replied on October 1

Because of the structure of the modern designer - any CSS or Javascript that you apply to your form is limited in scope in ways that the classic designer was not.

I have not tried this specific example, but I'm fairly certain that you are not going to be able to apply CSS to the area of the page where that button lives (the CSS is limited in scope to just the form itself, it doesn't even include all of the components in the scope, things like the calendar picker are not included).  And Javascript is going to be even more locked down (it runs within a sandboxed iFrame).

Personally, for this use case, I would proceed with your idea to use a submit button labeled as "Save Draft" and returning to the user task each time, rather than the built-in draft functionality.

1 0
replied on October 1 Show version history

One important thing I would note here, regardless of the implementation, collaboration on a form requires all users to know when the other is performing work on a form so they do not overwrite each others work. Take the following example:

  • User 1 opens the form, leaves section 1 blank, fills in section 2.
  • Before User 1 submits, User 2 opens the form, fills in section 1, and leaves section 2 blank.
  • While User 2 has the form open, User 1 submits the form.
  • User 2 can no longer submit their form and they need to refresh and start all work over again.
  • Even if User 2 could submit their form, they would overwrite User 1's edits and User 1 would have to start their work all over again.

Could you provide some background on what this form is doing and maybe we could steer the solution in a different direction?

(Unrelated, but kind of related, Calendar Picker CSS modifications are coming to self-hosted with v12)

1 0
replied on October 1

If you are using a single user task assigned to multiple individuals, then one individual has to claim it before they can work on it and submit it - it won't allow multiple users to do the same task at the same time.

The risk of overwriting each other would require simultaneous tasks assigned to the different users.

For the reason, I usually make sure that I only use simultaneous tasks when the system is ensuring they are working on different parts of the process (either different forms, or field rules to limit their ability to edit to just specific sections).  If they are working on the same parts of the same form, then having the single task works because the system prevents multiple users from working on and submitting the task at the same time, since it requires one of them to claim it first.

1 0
replied on October 1

I'm using only one task for Data Entry and having folks use the Reassign feature. The task is assigned to the Supervisor.  In most cases, we expect the Supervisor to reassign the task to themselves and the employee and request the employee to complete certain tabs leveraging the Assign to Me and Release buttons.  I've used this model with specific team roles in the past and it seems to work well.  This will be the first time I've used this functionality enterprise wide. 

I like the Save Draft feature as the save is so much faster than submitting the form, keeps the release group of people assigned, and gives folks a way to work with session limitations. I can't see this model working well though without the more permanent Save feature given the Save Draft feature isn't adjustable and you can't set it to commit the draft data to the form until an action button has been pressed.

If you know of a quick way to kill required validation on a form based on a variable that would be helpful.  Conditional validation on so many fields is a bit of a chore.

Appreciate the responses!

0 0
replied on October 1

If you know of a quick way to kill required validation on a form based on a variable that would be helpful.  Conditional validation on so many fields is a bit of a chore.

This is actually on my todo list for field rules. Want to provide the ability to require/not require at the form/section level for these types of use cases

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.