2 Replies Latest reply on Feb 9, 2007 7:29 AM by TheScarecrow

    CFFORM & CFOUTPUT

    TheScarecrow Level 1
      Can you have a CFFORM insidie a CFOUTPUT tag? For EX.

      <cfoutput query="info" group="Topic_Key">
      <CFIF #Ability_Q# IS NOT " ">
      <CFIF #URL.Q# GTE 1>
      <CFFORM name="answer1" action="index.cfm?Topic_Key=1&Q=2">
      <span class="questionsNormal">#Ability_Q[1]#</span><br />
      <CFinput name="Yes" type="checkbox" />YES.<br />
      <CFinput name="No" type="checkbox" />NO.
      </cfform>
      </CFIF>
      </CFIF>
      <br />
      <CFIF #Ability_Q# IS NOT " ">
      <CFIF #URL.Q# GTE 2>
      <span class="questionsNormal">#Ability_Q[2]#</span>
      </CFIF>
      </CFIF>
      </cfoutput>
        • 1. Re: CFFORM &amp; CFOUTPUT
          jdeline Level 1
          Yes you can. But be aware that your checkboxes have the same names: Yes and No. How are you planning to distinguish between them on your action page?

          Also, you can simplify your code by combining your two CFIF tags:
          <CFIF #Ability_Q# IS NOT " " AND #URL.Q# GTE 1>
          • 2. Re: CFFORM &amp; CFOUTPUT
            TheScarecrow Level 1
            ok I combined them but when I put in the the code
            <CFFORM name="answer1" action="index.cfm?Topic_Key=1&Q=2">
            <span class="questionsNormal">#Ability_Q[1]#</span><br />
            <CFinput name="Yes" type="checkbox" />YES.<br />
            <CFinput name="No" type="checkbox" />NO.
            </cfform>

            My page content disappears in preview, but when I remove it. It all reappears.