5 Replies Latest reply on Aug 16, 2013 7:06 AM by philmodjunk

    Toggle display of fields

    lowededwookie

      Title

      Toggle display of fields

      Post

           How would I go about showing/hiding fields based on options selected elsewhere?

           For example in my project I have four types of actions:

             
      •           Onsite
      •      
      •           Workshop
      •      
      •           Phone
      •      
      •           Email

           If I select Onsite I want these fields to display:

             
      •           Travel To
      •      
      •           Travel From
      •      
      •           Start KM
      •      
      •           End KM

           I want these to be hidden when Workshop, phone, or email are chosen as these fields are not required for these actions.

           Can anyone help me please? Can they be hidden? If not how can I grey them out to prevent access?

           Thanks.

        • 1. Re: Toggle display of fields
          SteveMartino

               How about making 4 tab panels, putting the fields you only want shown on each panel.  Name each tab panel (object). You can even hide the tab labels and select the panels via a drop down menu field  and script triggers.

          • 2. Re: Toggle display of fields
            lowededwookie

                 Because the action is a record in a portal against a job.

                 A job is created and assigned to an engineer.

                 The engineer then makes updates against this job based on the action taken.

                 Having a radio button for Onsite, Workshop, Phone, EMail which affects the fields accordingly means the correct action is added as the update. A tabbed interface for Onsite, Workshop, Phone, EMail would record the info correctly.

            • 3. Re: Toggle display of fields
              philmodjunk

                   You can put copies of the same portal in each tab panel. Use the position tab in the inspector to align these portal's exactly the same so that a tab change doesn't make the portal appear to "jump" unecessarily. Put the fields you need for each type of action in each portal.

                   That however, will only work well as long as you don't need to scroll your portals in synch with each other. That may still work will for data entry if you use the add new record button technique on sorted portals so that adding a new record creates a new blank row at the top of the portal instead of scrolling to the bottom to add new records.

                   There are ways that can hide fields within the portal, but you'll need to use script triggers to keep a user from accidentally entering the hidden field and you won't be able to resize the portal so when they disappear, you are left with a blank space inside the portal row.

                   See this demo file for a method that uses conditional formatting to hide both a field and it's border: https://www.dropbox.com/s/8levaz6deiyzjr8/LayoutObjectVisibilityControlDemo.fp7

              • 4. Re: Toggle display of fields
                lowededwookie

                     My plan would be to trigger a script that would open a window with the neccessary form rather than allowing editing of the portal itself so that example you linked to is exactly what I'm after.

                     I hate the List Editor view anyway, it's unintuitive and I want it to be so simple anyone can use it. Unfortunately to do that I have to do a bit of work. :-)

                • 5. Re: Toggle display of fields
                  philmodjunk

                       "List Editor View"?

                       What's that?

                       Table View isn't very user friendly--it's best used by use developers for a quick over view of the data in our system.

                       List View, if properly implemented, can provide the same overall view of data and be quite user friendly.

                       If you mean the "Table like" format of a portal, you don't have to use that default arrangement for your portal. By reszing the portal row, reducing the number of rows visible and moving, resizing the fields we place in that portal row, we can change from a "table" look to more of a "mini form" look for the rows in the portal.