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

Question

Question

Multiple user tasks created when switching between radio buttons

asked on November 4, 2015 Show version history

Hi,

We have a form where the submitter needs to make a radio button selection. Based on the selection made, a set of fields appear in the form (set from field rules). 

Imagine, the users selects 'No', fills input to the fields. Now, goes back and selects 'Yes'.

The fields relevant to the selection 'No' disappear. But, the inputs made to these fields are not reset. This is causing a confusion in the next tasks.

The major problem is, there are 2 user tasks created when we switch between the radio buttons.

Can you please give me some inputs to test whether switching is the reason for multiple tasks being generated or could there be any other reason?

 

Cheers,

Sneha

Capture_1.PNG
error-1.png
error-1.png (18.01 KB)
0 0

Answer

SELECTED ANSWER
replied on November 6, 2015

This issue can't be recreated internally. I have a generic business process that has a message start event, a user task event for approval/rejection and then an end event for each outflow path.

When I submit a form, click "No" in the radio button field, enter in a name, then change the radio button to "Yes" and then submit, the form submission is submitted with the value in the name field cleared out and there is only one corresponding user task generated.

As this is a separate issue from your original question, you may want to contact your Laserfiche reseller to open a support case so the matter can be investigated further.

1 0

Replies

replied on November 4, 2015

One option would be to use JavaScript and have a function for when the submit button is clicked, it will check the value of the signing authority radio button and if it's "Yes" then it will blank out the values entered into the fields that appeared when the option was originally "No"

In an example form, have the signing authority radio button with values "Yes" and "No". Give it the CSS class name, signingauth. Then add a second field to the form, for example, a single line field for "Name" and give it the CSS class name, name. Then configure your field rule to show the name field when signing authority is "No"

Now you can use JavaScript like the following

$(document).ready(function () {
  $('.action-btn').click(function() {
    $('.signingauth input:checked').each(function(){
      if ($(this).val().replace(/V_/g,'') == 'Yes'){
        $('.name input').val("");
      }
    });
  });
});

This way, if the user clicks "No", inputs a name, then clicks "Yes" and finally decides to click "No" again, the name that was typed in won't be lost. The JS will wait until the user clicks the Submit button and checks to see if the signing authority is "Yes" and if it is, then it will blank out the value entered into the name field before actually submitting.

1 0
replied on November 5, 2015

Hi Alexander,

The solution you gave works great for the single line input fields. But there is an upload field as well, how do I reset it?

The major problem is, there are 2 user tasks created when we switch between the radio buttons.

Can you please give me some inputs to test whether switching is the reason for multiple tasks being generated or could there be any other reason?

error-1.png
error-1.png (18.01 KB)
0 0
SELECTED ANSWER
replied on November 6, 2015

This issue can't be recreated internally. I have a generic business process that has a message start event, a user task event for approval/rejection and then an end event for each outflow path.

When I submit a form, click "No" in the radio button field, enter in a name, then change the radio button to "Yes" and then submit, the form submission is submitted with the value in the name field cleared out and there is only one corresponding user task generated.

As this is a separate issue from your original question, you may want to contact your Laserfiche reseller to open a support case so the matter can be investigated further.

1 0
replied on November 9, 2015

There was a problem in the business process.

Thanks!

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

Sign in to reply to this post.