Hide some choices from dropdown menu if database table has a certain value

Hi,

I have a form/list where in short people can choose a contract and a frequency to calculate an amount of money for a budget. In the old situation with every choice the ammount was calculated back to one hour and then multiplied with all hours/days till total ammount was calculated.

But in the new situation we need to calculate a total of several hours combined in a week or a month. I have reached this goal but now I need to achieve something different. If people choose the code for the combined hours I need some choices get hidden in other dropdown menu's because they are not necesarry for that particular code.

Screenshot_310.png

This are the choices of the "Frequentie" dropdown:

Screenshot_311.png
I think it will be something like (i dont know what code exactly)

if ($productcode == "07A12") {

hide: choice 1
choice 2
choice 5
}

I was looking in the dropdown settings I saw this area:

Screenshot_312.png
I think i have to write a query overhere.

But can someone tell me how i can hide some choices in the dropdown and change the default value?? That would really be appreciated.

regards

Jap
 
If you use dbjoins instead of dropdowns you can add a condition referring the Productcode element in Data-where and with "ajax update" enabled it will show the appropriate choises in the dropdowns.
https://fabrikar.com/forums/index.php?wiki/database-join-element/#data-where

I don't think dropdown's "Advanced populate" will help, I think this is only run on form load. So you would have to add custom JS/user ajax to modify your choises "on the fly".
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top