0 Replies Latest reply on Oct 19, 2006 8:17 AM by Coldfusionstudent

    show plural (S)when  more than one check box is checked

    Coldfusionstudent Level 1
      hello
      for both conditions BEE and DEE of the radio button
      i wish to show (S) for both (BEEGOODMethods(s) and BEEnotGOODMethods(s))on the output when more than one checkbox is checked
      and not show (S) if only one check box is checked.

      it will be passed for out put to

      salvage_GOOD_PDF.cfm
      and
      salvage_GOOD.cfm



      here is the code below/
      what do i have to add to the code
      thanks in adv







      cfparam name="form.finished" default="0"/>
      <cfparam name="form.text" default=""/>
      <cfset form.text = "#ReplaceNoCase(form.text, "#Chr(13)##Chr(10)#", "<br>", "ALL")#"/>

      <cfif form.finished EQ "1">
      <cfset formTitle="#formTitle#">
      <cfinclude template="dsp_HEAD.cfm">
      <cfinclude template="dsp_tablefields.cfm">
      </cfif>

      <table width="100%" border="0">
      <tr>
      <td>
      <cfif form.finished EQ "0">
      <form name="theForm" action="salvage_GOOD.cfm" method="POST">
      please describe:<br>
      <textarea cols="40" rows="6" name="text"></textarea><br />
      <cfelseif form.finished EQ "1">
      <form name="theForm" action="salvage_GOOD_PDF.cfm" method="POST">
      <p><strong><u>please describe</u>:</strong> <cfoutput>#form.text#</cfoutput><br/>

      <cfelse>
      <p><strong><u>please describe</u>:</strong> <cfoutput>#form.text#</cfoutput><br/>

      </cfif>

      </td>
      </tr>


      <cfif attributes.BEEDEEector is "BEE">

      <tr>
      <td><p><strong><u>GOOD</u></strong><br />
      BEEGOODMethods(s):</p>
      </td>
      </tr>
      <tr>
      <td><cfif form.finished EQ "0">

      <p>
      <input type="Checkbox" name="a">
      check BEEGOODMethods_a </p>
      <p>

      <input type="Checkbox" name="b">

      check BEEGOODMethods_b
      </label>
      <p>
      <input type="Checkbox" name="c">
      check BEEGOODMethods_c </p>
      <p>

      <input type="checkbox" name="d">
      check BEEGOODMethods_d

      <br clear="all" />
      </p>
      <cfelse><!--- if the form is finished --->
      <cfparam name="form.a" default="0">
      <cfparam name="form.b" default="0">
      <cfparam name="form.c" default="0">
      <cfparam name="form.d" default="0">


      <cfif form.a EQ "on"> <!-----project good/ BEE OUTPUT---->
      <p>
      output check BEEGOODMethods_a </cfif>

      <cfif form.b EQ "on">
      <p>
      output check BEEGOODMethods_b
      </cfif>

      <cfif form.c EQ "on">
      <p>
      output check BEEGOODMethods_c
      </cfif>

      <cfif form.d EQ "on">
      <p>
      output check BEEGOODMethods_d

      </cfif>



      </cfif> --->
      </cfif>
      </td>
      </tr>



      <cfelse><!--- if form.BEEDEE is NOT BEE --->
      <tr>


      <td><p><strong><u>NOTGOOD</u></strong><br />
      BEENOTGOODMethods(s):</p>
      </td>

      </tr>
      <tr>
      <td>
      <cfif form.finished EQ "0">

      <input type="Checkbox" name="a"> <!---- check boxes for DEEector ------->
      check BEEnotGOODMethods_a
      <p>

      <input type="Checkbox" name="b">

      check BEEnotGOODMethods_b


      <p>
      <input type="Checkbox" name="c">
      check BEEnotGOODMethods_c</p>
      <p>

      <input type="checkbox" name="d">
      check BEEnotGOODMethods_d

      <p>

      </p>
      <cfelse><!---- if the form is complete --->
      <cfparam name="form.a" default="0">
      <cfparam name="form.b" default="0">
      <cfparam name="form.c" default="0">
      <cfparam name="form.d" default="0">
      <cfparam name="form.e" default="0">

      <cfif form.a EQ "on"> <!-------- output for the check boxes-OUTPUTOUTPUT-OUTPUT-OUTPUT----->
      <p>
      output check BEEGOODMethods_a
      </cfif>

      <cfif form.b EQ "on">
      <p>
      output check BEEGOODMethods_b
      </cfif>

      <cfif form.c EQ "on">
      <p>
      output check BEEGOODMethods_c
      </cfif>
      <cfif form.d EQ "on">
      <p>
      output check BEEGOODMethods_d
      </cfif>



      </cfif> <!--- end the if form is complete --->


      </td>
      </tr>


      </cfif>
      </table>



      </tr>


      <tr>
      <td>

      <br><br><br>
      <cfoutput>

      <input type="Hidden" name="attributes.BEEDEEector" value="#attributes.BEEDEE#">
      <input type="Hidden" name="finished" value="1"/>



      <cfif form.finished EQ "0">

      <input type="Submit" value="Continue >>">

      <cfelseif form.finished EQ "1">
      <input type="hidden" name="a" value="#form.a#"/>
      <input type="hidden" name="b" value="#form.b#"/>
      <input type="hidden" name="c" value="#form.c#"/>
      <input type="hidden" name="d" value="#form.d#"/>
      <input type="hidden" name="e" value="#form.e#"/>
      <input type="hidden" name="headerFull" value="1"/>
      <input type="submit" value="Print PDF"/>

      </cfif>
      </cfoutput>
      </form>

      </td>
      </tr>
      </table>