Hide multiple elements at once
Hello friends,
I am trying to hide two or more form elements (text boxes) from within the "Display field only if" setting of one of the elements. How can I achieve this ??
I can for sure hide the respective element based on the condition I set in the above setting, however I am not able to find any function or property that can be used to hide another element from within the same setting. If this is achievable, it will save me from going to every element's "Display field only if" property. Also it's kind of easy for anyone to understand the code when all the fields that need to be hidden are hidden at the same place rather than going into every individual fields settings.
Please advise !!
10 replies
-
Not sure this will help but I have an ADMIN Tab with fields I want only visible to me. The visibility of that tab is based on my email address thus invisible to anyone else.
-
You have to edit each field's 'Display field only' if at least once to put in the code to do the checking.
Now the big question is how to make the checking more flexible. There probably needs to be another table or two that stores the data to figure out when to display or not.
-
I have a "Hidden" tab on all my forms. Here I put all the fields I don't need to see and hide the tab with
isAdminMode()
That way I only see this tab, and it's fields, if I am in admin mode otherwise it's hidden. There is no code needed with the fields' Display field only if...
Regards John
-
Thank you all for the reply, but I am actually looking for a way to hide/unhide multiple elements in runtime based on certain condition/criteria and all of them from the same place so that I don't have to hide them individually from their settings respectively.
Looks like this is not possible in Ninox. If this was possible though, it would really make the code more manageable and readable. Ninox has great features when it comes to database scripting. It is a database tool on STEROIDS. But when it comes to UI/UX or programming (not related to data operations), it is very very limited and rigid.
-
I would add a formula field where you can code the conditions that show or hide the fields. Then use this field in the Display field only if... of the fields you need to control.
Regards John
-
said:
Thank you all for the reply, but I am actually looking for a way to hide/unhide multiple elements in runtime based on certain condition/criteria and all of them from the same place so that I don't have to hide them individually from their settings respectively.I think that is what we have offered. But you have to touch each field that you want affected at least once to put in the code that gets the data you want.
It can be as simple as a text or yes/no field. Or complex as a "field access" table that cross references a user table and a permission table.
-
I will tell you exactly what I am trying to achieve. I have a form called Transfer on which I have two Dynamic Choice fields (From_Wallet & To_Wallet) that contain the Wallet names from the "Wallets" table. Next to the each of them is the Wallet address fields (From_Address & To_Address). So as soon I chose a value in From_Wallet, it autofills the From_Address (scripted inside the trigger on From_Wallet). Both From_Address and To_Address fields are non editable (as they should get autofilled. However sometimes the transfer can happen from an external wallet that I don't have saved in my Wallets table as it is just a one off transfer. In that case I have a category called "Other Wallet" that I choose from the Choice field.
So when I choose "Other Wallet", I want to hide the "From_Wallet" text field and display the "Other_Wallet_Address" text field ( 'cuz person needs to manually fill the wallet address in "Other_Wallet_Address" ).
So I wanted that if I could get the option to hide/unhide the fields at one place it would be great.
Screenshot attached...
-
Vermaji
Coming at this from a very simple point of view. I have a form that I only want to see extra fields at the point that i am invoicing thus use a yes/no field to switch on a set group of fields. You could surely do something similar that triggers when you use "other wallet" thus if other wallet true then show those fields and in some cases it then goes to turn off others.
I use a yes/no switch field but you could trigger in many other ways
switch is set to off
switch is set to on
Content aside
- 1 mth agoLast active
- 10Replies
- 44Views
-
5
Following