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

Multiple Selects in a single form

New Here ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

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

Views

665

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
LEGEND ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

Didn't I just read this question as part of another thread?

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
New Here ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

Yes you did. I didn't know if everyone reads all the threads and I was just looking for some help. I saw the title to this thread and thought I would post it here also.

Thanks

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
Mentor ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

It is called cross posting and is considered bad forum etiquette.

Phil

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
New Here ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

give'em a break. he is probably under pressure (like we all have been). in response, i do not even see some of the variables you are checking in the second script in the first. get this one straight and i think it'll work.

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
New Here ,
Nov 30, 2006 Nov 30, 2006

Copy link to clipboard

Copied

LATEST
Alright guys thanks for understanding and paross it is a little bit of both. I am going to stick to the first thread under general discussion.

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
New Here ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

Thanks for the lesson in forum etiquette. Fairly new at the whole thing and never thought about it. Honestly didn't know there was such a thing.

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
Mentor ,
Nov 29, 2006 Nov 29, 2006

Copy link to clipboard

Copied

No problem. It usually indicates (1) a rookie, or (2) somebody who is real desperate. By the way, I posted a few questions in your other post...

Phil

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