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

CFFORM & CFOUTPUT

Community Beginner ,
Feb 09, 2007 Feb 09, 2007

Copy link to clipboard

Copied

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>
TOPICS
Advanced techniques

Views

277

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
Guest
Feb 09, 2007 Feb 09, 2007

Copy link to clipboard

Copied

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>

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 Beginner ,
Feb 09, 2007 Feb 09, 2007

Copy link to clipboard

Copied

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

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