7 Replies Latest reply: Jul 10, 2012 6:31 AM by userCold9 RSS

    Datefield does not work with cflayoutarea

    userCold9 Community Member

      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

        • 1. Re: Datefield does not work with cflayoutarea
          Aaron Neff

          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

          • 2. Re: Datefield does not work with cflayoutarea
            userCold9 Community Member

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

             

             

             

            Mike

            • 3. Re: Datefield does not work with cflayoutarea
              itisdesign CommunityMVP

              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

              • 4. Re: Datefield does not work with cflayoutarea
                userCold9 Community Member

                Below is the cflayout tag

                 

                 

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

                 

                 

                 

                 

                Mike

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                • 5. Re: Datefield does not work with cflayoutarea
                  userCold9 Community Member

                  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.

                   

                   

                  Mike

                   

                  • 6. Re: Datefield does not work with cflayoutarea
                    itisdesign CommunityMVP

                    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

                    • 7. Re: Datefield does not work with cflayoutarea
                      userCold9 Community Member

                      I got the code to work with three tabs being accessed with a link in the menu on the life side of the screen. I am trying to get the next three tabs to work with the second link in the menu.

                       

                      Mike