7 Replies Latest reply on Nov 30, 2006 5:31 AM by Rcain37

    Multiple Selects in a single form

    Rcain37
      I have six select boxes and I want them in a single form. Below are the outputs for the select boxes.

      <cfform action="Resolution_History.cfm?year=#year#&sessiontype=#sessiontype#&btype=res" name="form">
      <select name="SRINPUT">
      <option value="">SR
      <CFOUTPUT Query="findSR"><Option Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
      </select>

      <select name="HRINPUT">
      <option value="">HR
      <CFOUTPUT Query="findHR"><Option Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
      </select>

      <select name="SCRINPUT">
      <option value="">SCR
      <CFOUTPUT Query="findSCR"><Option Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
      </select>
      <br>
      <select name="HCRINPUT">
      <option value="">HCR
      <CFOUTPUT Query="findHCR"><Option Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
      </select>

      <select name="SJRINPUT">
      <option value="">SJR
      <CFOUTPUT Query="findSJR"><Option Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
      </select>

      <select name="HJRINPUT">
      <option value="">HJR
      <CFOUTPUT Query="findHJR"><Option Value="#BILLNUMBER#">#BILLNUMBER#</cfoutput>
      </select>

      <INPUT TYPE="Submit" VALUE="Submit" alt="submit button">
      </cfform>

      Once a user selects a number it will send them to an action page. On the action page I need the below IF statement to work so it will set the variables. It isn't working at this time. Its not bringing the values of billnumber, houseorig or the billtype.

      Does anyone have any thoughts? I know it is close to working and I need to set all of the inputs to input4 to generate my queries so I don't have to duplicate them.

      <cfif form.srinput gt "0">
      <cfset s = '#houseorig#'>
      <cfset r = '#billtype#'>
      <cfset input4 = '#srinput#'>

      <cfelseif form.hrinput gt "0">
      <cfset h = '#houseorig#'>
      <cfset r = '#billtype#'>
      <cfset input4 = '#hrinput#'>

      <cfelseif form.scrinput gt "0">
      <cfset s = '#houseorig#'>
      <cfset cr = '#billtype#'>
      <cfset input4 = '#scrinput#'>

      <cfelseif form.hcrinput gt "0">
      <cfset h = '#houseorig#'>
      <cfset cr = '#billtype#'>
      <cfset input4 = '#hcrinput#'>

      <cfelseif form.sjrinput gt "0">
      <cfset s = '#houseorig#'>
      <cfset jr = '#billtype#'>
      <cfset input4 = '#sjrinput#'>

      <cfelse>
      <cfset h = '#houseorig#'>
      <cfset jr = '#billtype#'>
      <cfset input4 = '#hjrinput#'>
      </cfif>