2 Replies Latest reply on Nov 20, 2009 12:45 PM by djkhalif

    Show fields IF <cfif>

    djkhalif Level 1

      Good morning all,

       

      I want to show certain cfinput fields if specifc data is returned. For instance, I query a table and if a model number contains a 2 then, show <cfformgroup name="two"> else show <cfformgroup name="One"> elseif model contain 4 then, <cfformgroup name="Four">. I want to use this method to reduce user error by having them select from a drop down.

       

      Thanks in advance,

       

      djkhalif

        • 1. Re: Show fields IF <cfif>
          Dan Bracuk Level 5

          This has the potential to be a goat's breakfast.  How many records does the query return?  If it returns more than one, do you want a dropdown for each record or one dropdown for everything?

           

          What if a model number contains a 2 and a 4?

          • 2. Re: Show fields IF <cfif>
            djkhalif Level 1

            Dan,

             

            The query will only return one record, one model per workorder. That model can only return with a 2, 4 or without a number for 1.

             

            For example:

             

            Work Order:  553901

             

            Item: ab9944-13

             

            Model: 2XTHC-7 or 4XTH-7  or XTHC

             

            The Model has to be one or the other. So, I need to record the amp for cell (2, 4 or 1). Each number represents a cell count. I don't want user to enter in more or less than the necessary cell. I could do 4 inputs and let the user determine by model but user error.

             

            Thanks,

             

            djkhalif