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

Question

Question

hide button based on field value

asked on February 28, 2020

I see lots of help (answers, help files, and business process library) on hiding the submit button when radio buttons are selected, but cannot find anything based on a single field.

I have a field that is passed on from a previous form. It is hidden. I need to hide the submit button if the value is "Anonymous User".

I have tried various scenarios, but I am not an experienced coder. I can't get anything to work.

Please help.

0 0

Replies

replied on February 28, 2020

Hi Mary Lou

Typically in a scenario to Hide the Submit button, there is also an action for when to Show the Submit Button as well. Can you provide the Fields you are using and the scenario to Hide as well as to show the Submit button.


  

0 0
replied on March 2, 2020

It needs to do it on load. There is not a physical trigger on the form. The value is passed from a previous form.

If the submitter from the previous form is anonymous, it will terminate the process if the reviewer tries to send it back to them for more info. I need a way top prevent them from doing this. 

If the user is a licensed user, then the button should allow the reviewer to send it back for more info.

My hidden field is called HiddenUser.

0 0
replied on March 2, 2020 Show version history

Hi Mary Lou

Have you considered changing your workflow and using an Exclusive Gateway that would test for the Anonymous User Value, and if so route it to a task that doesn't have the option to route back to the submitter. This way you stay away from coding and accomplish the same thing. Example could be something like this

From the Yes & No Task, you could have them go to the same task

0 0
replied on March 2, 2020 Show version history

Just an FYI, JS will not read the data from the form if in the Task, under the Forms Tab, "Make form read-only for users the task is assigned to" is checked

0 0
replied on March 2, 2020

This would hide the Reject button on form load if the field contained a certain value

$(document).ready(function() {

    if ($('#q3 input').val() == "Jiminy Cricket" )

    {
    $('.Reject').hide();
    }

});

0 0
replied on March 2, 2020

For the 3 different buttons

    $('.Submit').hide();

    $('.Approve').hide();

    $('.Reject').hide();

0 0
replied on March 19, 2020

Still couldn't get this to work. I think it is the trigger event. I will rethink my process and try to come up with a different solution.

0 0
replied on March 19, 2020

Is the Form set to Read Only when it is open in this task?

0 0
replied on March 19, 2020

No, but the field is set as read only.

0 0
replied on March 19, 2020

As a test, remove Read Only from that field. We may need to set Read Only for that field with JS as opposed to using the native "Read Only"

0 0
replied on March 19, 2020

Nothing happened.

0 0
replied on March 19, 2020

If we want to connect via a web meeting, I could have a look with you.

0 0
replied on March 20, 2020

Sorry, just got your note. I was pulled into an emergency meeting after my last post. My form will be on hold for a bit due to other circumstances. After this is all over, I will revisit.

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

Sign in to reply to this post.