Skip navigation
userCold9
Currently Being Moderated

Datefield does not work with cflayoutarea

Jul 2, 2012 3:10 PM

I am trying to get the CFINPUT with a datefield working inside a table.

 

The table is inside a cfajaximport which is inside the cflayoutarea.

 

The code below works without the cflayoutarea.

 

<cfajaximport tags="CFINPUT-DATEFIELD, CFAJAXPROXY, CFINPUT-AUTOSUGGEST, CFPOD, CFTOOLTIP, CFSPRYDATASET-JSON, CFTEXTAREA, CFDIV, CFLAYOUT-TAB, CFFORM ">  

<CFOUTPUT>
<cfform name="Five" ACTION="formaction.cfm" METHOD="post">
<TABLE>
<TR>
  <TD>
   date
  </TD>
  <TD><P> </P><P> </P><P> </P>
   <CFINPUT TYPE="datefield" NAME="start" ><P> </P><P> </P><P> </P>
  </TD>
 
</TR>

</TABLE>
<cfinput type="submit" name="Save" value="Save">
</CFFORM>
</CFOUTPUT>
</cfajaximport>

 

 

As soon as the cflayoutarea is inserted, the code does not run. Below is the code for the cflayoutarea.

 

<cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility" overflow = "auto" selected="false" title="Service" align="left">

 

There will be more than one date fields in the table.

 

The HTML, BODY and HEAD are located in the calling module.

 

Is there a solution?

 

 

 

Thanks,

 

 

Mike

 
Replies
  • Currently Being Moderated
    Jul 2, 2012 11:08 PM   in reply to userCold9

    userCold9 wrote:

     

    <cfajaximport tags="CFINPUT-DATEFIELD, CFAJAXPROXY, CFINPUT-AUTOSUGGEST, CFPOD, CFTOOLTIP, CFSPRYDATASET-JSON, CFTEXTAREA, CFDIV, CFLAYOUT-TAB, CFFORM ">  

    [...]

    </cfajaximport>

     

    Hi Mike,

     

    The closing </cfajaximport> is unnecessary and can be removed.

     

    userCold9 wrote:

     

    As soon as the cflayoutarea is inserted, the code does not run. Below is the code for the cflayoutarea.

     

    <cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility" overflow = "auto" selected="false" title="Service" align="left">

     

    Two issues:

    1) The <cflayoutarea /> tag must be within a <cflayout /> tag.

    2) The <cflayoutarea /> tag requires an end tag.  (ex: either close it w/ " />" or w/ "</cflayoutarea>")  Please try this:

     

    <cflayout type="tab">

      <cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility" overflow = "auto" selected="false" title="Service" align="left" source="my_content.cfm" />

    </cflayout>

     

    or

     

    <cflayout type="tab">

      <cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility" overflow = "auto" selected="false" title="Service" align="left">my content</cflayoutarea>

    </cflayout>

     

    (depending on which way you want to include the contents)

     

    (you could also change type="tab" to type="accordion")

     

    Resources:

    - cflayoutarea

     

    Thanks,

    -Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 3, 2012 9:56 PM   in reply to userCold9

    Hi Mike,

     

    Could you please post your opening cflayout tag?  I wrapped your code (minus the cfajaximport, b/c it's unneeded here) w/ a cflayout tag having a height, and the datefield was then fully visible.  The cflayout's height needs to be tall enough to display the datefield.  Could you try this:

     

    <cflayout type="tab" height="300">

    <cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility" overflow = "auto" selected="false" title="Service" align="left">

    <CFOUTPUT>

    <cfform name="Five" ACTION="formaction.cfm" METHOD="post">

    <TABLE>

    <TR>

      <TD>

       date

      </TD>

      <TD><P> </P><P> </P><P> </P>

       <CFINPUT TYPE="datefield" NAME="start" ><P> </P><P> </P><P> </P>

      </TD>

     

    </TR>

     

    </TABLE>

    <cfinput type="submit" name="Save" value="Save">

    </CFFORM>

    </CFOUTPUT>

    </cflayoutarea>

    </cflayout>

     

    Thanks,

    -Aaron

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 5, 2012 1:08 PM   in reply to userCold9

    userCold9 wrote:

     

    <cflayout type="tab" height="800" >

     

    If I place the code in a single tab and the code is not in a module being called using the cfinclude, it works.

     

    But if there are more than one cflayoutarea under the cflayout it does not work or if the code is placed in another module that is called, it does not work.

    Hi Mike,

     

    Could you try this?

     

    <cflayout type="tab" height="800">

      <cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility" overflow = "auto" selected="false" title="Service" align="left">

        <cfinclude template="myfile.cfm" />

      </cflayoutarea>

      <cflayoutarea bindonload="false" closable="false" inithide="false" name="TANursingFacility2" overflow = "auto" selected="false" title="Service 2" align="left">

        Tab 2

      </cflayoutarea>

    </cflayout>

     

    where myfile.cfm contains this:

     

    <CFOUTPUT>

    <cfform name="Five" ACTION="formaction.cfm" METHOD="post">

    <TABLE>

      <TR>

        <TD> date </TD>

        <TD><P> </P>

          <P> </P>

          <P> </P>

          <CFINPUT TYPE="datefield" NAME="start" >

          <P> </P>

          <P> </P>

          <P> </P></TD>

      </TR>

    </TABLE>

    <cfinput type="submit" name="Save" value="Save">

    </CFFORM>

    </CFOUTPUT>

     

    I'm seeing the datefield fine.  Perhaps there is some other code contributing to the issue?  Could you post a full example that we can try?

     

    Thanks,

    -Aaron

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points