0 Replies Latest reply on Nov 16, 2006 7:28 AM by Coldfusionstudent

    if zero or one check box is checked then item (NO S)is shown if more than one check box is checked then items will show

    Coldfusionstudent Level 1
      if zero or one check box is checked then item (NO S)is shown if more than one check box is checked then items will show (show S)


      <cfparam name="variables.morethanone" default="0">
      <cfset count.morethanone= 0>
      <cfloop index="checkField" list="#form.1#,#form.2#,#form.3#,#form.4#,#form.5#">
      <cfif checkField EQ "on">
      <cfset count.morethanone= count.morethanone + 1 >
      </cfif>
      </cfloop>
      <cfif count.morethanone GT 1>
      <cfset variables.morethanone = "1">
      </cfif>

      item<cfif variables.morethanone>s</cfif>

      ------------------------------------------------------------------------------------------ --------
      i wish to have the item show items:
      in a page before submit.

      when a ((no,0) or one ) checkbox is checked and submit then items will become item (s disapears)
      if more than one check box is checked then s will appear/show after submit button.

      the code i have does not show the s on the initial page (before submit)
      it show as
      please click one of the following item instead i need it to show: please click one of the following items

      then the logic i have just explained above.

      what do i do thanks.