4 Replies Latest reply on Feb 6, 2015 9:21 AM by BalddogRobin

    cfgridupdate hidden field

    rboudwin Level 1

      Is there a way to insert a hidden field using cfform, cfgrid, and cfgridupdate?

        • 1. Re: cfgridupdate hidden field
          BKBK Adobe Community Professional & MVP

          It is unclear to me what you mean. Insert into into what? You could just declare the type of an input field in a form to be 'hidden'.

          • 2. Re: cfgridupdate hidden field
            BalddogRobin Level 1

            I don't think using a hidden field will work with cfgrid and cfgridupdate.  It's not working for me, but maybe I'm missing something.

            • 3. Re: cfgridupdate hidden field
              BKBK Adobe Community Professional & MVP

              Again, what do you mean? What is the context?

               

              You could just use a hidden form field next to the cfgrid, like this

               

              <cfform>

              <cfgrid>

              </cfgrid>

              <cfinput type="hidden">

              </cfform>

              • 4. Re: cfgridupdate hidden field
                BalddogRobin Level 1

                I did exactly what you show, and it doesn't insert the hidden field when using Insert a Row.

                 

                <!---Save Grid --->   

                <cfif IsDefined("form.factsEntered") is True>

                <cfgridupdate grid="FactsGrid" Keyonly="true"

                datasource="#application.dsn#"

                tablename="pmspProductionFacts" >

                 

                <!---Output Grid--->
                <cfform>
                <cfgrid name = "PrioritiesGrid"
                  query = "priorities"

                   width="100%"

                insert = "yes"
                delete = "yes"
                rowHeaders = "No"

                  rowHeight="25"

                colHeaderBold = "Yes"
                selectMode = "EDIT"
                insertButton = "Insert a Row" deleteButton = "Delete selected row" sort="yes" >

                 

                    <cfgridcolumn name="pmsppriorityid" display="false">

                    <cfgridcolumn name="pesttypeid" header="Pest Type"  display="yes" width="100" valuesdisplay="#variables.pesttypes#" values="#variables.pesttypesid#" valuesdelimiter=",">

                    <cfgridcolumn name="prioritytypeid" header="Priority Type"  display="yes" valuesdisplay="#variables.prioritytypes#" values="#variables.prioritytypesid#" valuesdelimiter="," width="100">

                    <cfgridcolumn name="cropstageid" header="Stage"  display="yes" width="300" valuesdisplay="#variables.cropstages#" values="#variables.cropstageids#" valuesdelimiter=",">

                    <cfgridcolumn name="prioritynumber" header="Priority Number"  display="yes" width="100">

                    <cfgridcolumn name="criticalneed" header="Critical Need" display="yes" valuesdisplay="True,False" values="true,false" valuesdelimiter=",">

                     <cfgridcolumn name="priority" header="Priority" display="yes" width="1500">

                  

                    </cfgrid><br />

                  

                    <cfinput type="hidden" name="pmspid" value="#url.pmspid#">

                  

                <div align="center"><cfinput type="submit" name="prioritiesEntered" value="Save Priorities"></div>
                </cfform>