Forms - how to add more then one condition in Forms

In Forms - I have one condition on a dropdownbox.

“key”: “ddb 1”,
“conditional”: {
“show”: false,
“when”: “rb2”,
“eq”: “2”
},

How can I add one more condition similar to the uppar one. can someone hep?

If i do the same in if statement it want like this…

if(rb2 = “2” And rb1 = “5”)
then
“show”: false,
else
“show”: true,

So how can i add, And funtion in JSON. its only that i need.

Hi @Latif,
You can for example create dropdown in form and bind it with output argument. Then inside the form you can put case activity. So if you will select dropdown option and click “submit” your case will look for which option was selected in dropdown after submission.

@Pablito
I dont think I can use arguments as I need to hide at the same time im on form means result shoud show at the same time…

for eksample.
when I choose radio button number 4 and second dropdox have No value then first deopdown box should not hide.
But when I do the other way … I use same radio button 4 value and add value to second
dropdown box then first deopdown box should hide.

I have already a condition on 2nd dropdown box that it shoud hide when the first dropdown box have a specifik value.

so I can not use second dropdown box for condition either to make my uppar condition work.

So kindly help

Could you somehow draw it so it will be more clear to me? :slight_smile:

HI @Pablito

So here is the example.

DropDownConditionOnForms.zip (49.4 KB)

I want a condition on project 4 -
That when i click on project 4 it has to show me the dropdown “Select Team Number” but as soon as i fill the “Select Offices Form” it should HIDE the “Select Team number”
But remember all other condition should be same as it is in the project.

hi @Pablito @Vajrang can you help me on that FORMS condiiton issue… I have attached the project. would appericate your help.
@Vajrang I have seen your youtube videos but I could not find help related to my issue so kindly look at that project and help me.
Thanks in advance.

This should work like you mentioned:
DropDownConditionOnForms.zip (52.5 KB)

Btw. You couldn’t select the first element in conditional because the list is going under the windows. I reported this as a bug.
image

No its not the issue… I know about that I did that but then its still not apperaing like it has too…
The example is not right which you send it…


In picture when i click at Project 4 and as soon as I click at Select offices Form then the Select Team dropdown should hide.
But when i choose dropdown on Select Teams number then the Select Offices Form should hide.
like this

Its has to be in condition like Hide → when Project = 4 and Select office Teaam is either All offices Or Single office.

This is what i need to handel in condition.

This will be to much complicated as forms components allows for one condition. But as I told before you can divide these components and have them in separate forms and then use case or if activity after each form to check which option was selected in which component and base on this decide what should be displayed.

Example
FormExample.zip (40.8 KB)

Ok I thought maybe by using Logic we can do this.

Hey!! I am posting an update to this thread because I have figured out how to do this. You need to use the Advanced Conditions option, and then use Javascript to write your logic. Then you will change the value of the ‘show’ boolean depending on if you want it to show or not. For example, I have two checkboxes, runPV1Process and runPlanAndBudget, that need to be checked to determine if my other field should be displayed on the form. In the Javascript box of the advanced conditionals field I have this:

if(data.runPV1Process === false && data.runPlanAndBudget === true)
{
show = true;
}else{
show = false;
}

This makes it to where my new field will only display if runPV1Process is set to false and runPlanAndBudget is set to true.

Another note: You can add conditionals to fields that don’t natively support them by altering the JSON for the specific field you are working with. For example, my new field that I want to show up when those conditions are met is a filepath field, which doesn’t have a conditions tab. I clicked into the json for that field and added this line, which uses the same javascript logic as above to determine if this field should show:

“customConditional”: “if (data.runPV1Process === false && data.bool_runPlanAndBudget === true){show = true;}else{show = false;}”,

Be sure that each line in your json except the last ends in a comma or it will not work.