Skip to main content
Inspiring
July 2, 2012
Question

Datefield does not work with cflayoutarea

  • July 2, 2012
  • 1 reply
  • 2010 views

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

    This topic has been closed for replies.

    1 reply

    itisdesign_-_AH
    Inspiring
    July 3, 2012

    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

    userCold9Author
    Inspiring
    July 3, 2012

    I tried the recommended solutions and the datefield still does not work inside a table.

    Mike

    itisdesign
    Inspiring
    July 4, 2012

    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