• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfgridupdate hidden field

Guest
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

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

Views

448

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 07, 2014 Oct 07, 2014

Copy link to clipboard

Copied

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'.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 03, 2014 Nov 03, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 03, 2014 Nov 03, 2014

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 03, 2014 Nov 03, 2014

Copy link to clipboard

Copied

LATEST

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation