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

Question

Question

Button control not found in Forms

asked on January 21, 2014

When I was designing my form in Laserfiche, i did not see any button controls. I need to have some additional buttons in my form like "Cancel". Do I acheive this using custom HTML controls? If I use custom controls, and if some one hits "Cancel" in the middle of business process, how is that handled in the process modeler? Do we have a bunch of hanging processes?

 

0 0

Answer

APPROVED ANSWER
replied on January 21, 2014

It depends on where the buttons should appear. For the starting form of a process, you can specify the button label in the Process Modeler by going to the message start event's settings.

 

For user tasks, you can specify the action and label for those buttons and, using gateways, can determine what happens when a particular button is clicked.

 

If you want to add buttons on your form, you'll want to use the Custom HTML fields and enter something like this:

 

<input value="Done" type="button">

Of course, you'll need to use JavaScript if you want a certain behavior to happen when the button is clicked.

 

If you want to cancel a currently running instance of a process, you can do this from the Results page for that process by selecting the instance and clicking Stop. After you've stopped the instance, it will be canceled and you can selected it again to delete it.

 

I might not fully understand what you're asking. Currently, the only way to cancel a process is to do what I just described on the Results page.

0 0
replied on September 27, 2019

How would I go about adding another action button for a user task? There currently are three available (Submit, Approve, Reject) and I would like to add a fourth.

0 0

Replies

replied on January 22, 2014

Sure. In this example I have a simple form with a single line field (given the filledField class, variable name Filled_Field) and a custom HTML field used for a cancel button.

 

 

I'm using the following JavaScript to fill this field with the value "Canceled" when the user clicks the button.

 

$(document).ready(function () {  
  $('.cancelButton').click(function () {
    $('.filledField input').val("Canceled");
  });
});

 

Here's the process model:

 

 

 

The exclusive gateway is configured to route the process to the "Canceled" end event when the filled field's value is "Canceled"

 

3 0
replied on January 21, 2014

Ok, thanks. I have a asp.net application and laserfiche forms is embedded in one of the pages. If I have a "Cancel" custom html buton, what happens if the user hits that in the web page?. I will write custom code to redirect the user back to starting page but in the backend what happens to that process? How does the process show in Results page? 

0 0
replied on January 21, 2014

If you want the process to end when a user clicks this button, you could use JavaScript to insert a value in a hidden field when the button is clicked.

 

In the process model after the user task, you could use a gateway that routes the process to an end event when the field has that value. Then the process will show as being finished on the Results page.

 

Does that make sense?
 

2 0
replied on January 22, 2014

Thanks. Let me try it.

0 0
replied on January 22, 2014

Can you please provide me with a simple example? I have  a message event and end event in my business process. I do not have any user task or gateways. Thanks.

 

0 0
replied on January 22, 2014

Thanks. I will give it a try.

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

Sign in to reply to this post.