Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use a single text form and use it twice

Status
Not open for further replies.

rojas1mg

Programmer
Jun 15, 2004
119
0
0
US
Ok,
I know my subject doesn't make a lot of sense, but I didn't want to use too much space on that. I need assistance on developing a form that'll transfer funds between two organizations. For example, Office 1 wants to transfer $500 to Office 2 to buy their office supplies. What I don't want to do is have two text lines and have them "accidentally" not take enough out of their account and transfer into the other an invalid amount.
Here's what I have. I have a form that is set up in a table. The left hand side of the table is my FROM: line and the right hand side of the table is my TO: side.
Here is my form:
Code:
<form action="target_change_request_thx.cfm" method="post">
<table border="1" title="Target Change Request" Summary="Target Change Request" align="center">
	<TR>
		<TD class="total">From:</TD>
		<TD class="total">To:</TD>
	</TR>
	<TR>
		<TD align="center">Unit</TD>
		<TD align="center">Unit</TD>
	</TR>
	<TR>
		<TD align="center">
		<select name="from_unit_id">
		<cfloop query="getunit">
		<option value="#getunit.unit_id#">#getunit.unit#
		</cfloop></option>
		</select>
		</TD>
		<TD align="center">
		<select name="to_unit_id">
		<cfloop query="getunit">
		<option value="#getunit.unit_id#">#getunit.unit#
		</cfloop></option>
		</select>
		</TD>
	</TR>
	<TR>
		<TD align="center">From EEIC</TD>
		<TD align="center">To EEIC</TD>
	</TR>
	<TR>
		<TD>
		<SELECT name="from_eeic_ID">
		<cfloop query="geteeic">
		<OPTION value="#geteeic.eeic_ID#">#geteeic.eeic#</cfloop></OPTION>
		</SELECT>
		</td>
		<TD>
		<SELECT name="to_eeic_ID"><cfloop query="geteeic">
		<OPTION value="#geteeic.eeic_ID#">#geteeic.eeic#</cfloop></OPTION>
		</SELECT>
		</td>
	</TR>
	<TR>
		<TD align="center" colspan="2">Amount</TD>
	</TR>
	<TR>
		<TD align="center" colspan="2"><input type="Text" size="2"></TD>
	</TR>
	<TR>
		<TD align="center" colspan="2"><input type="Button" name="Submit" value="Submit Target Change"></TD>
	</TR>
</table>
</form>
In essence, I'd like to take that <amount> field and multiply by it once by -1 and pass that variable through on the unit_id and take the initial value and send that through to the second unit.


rojas1mg - - - I love Tek-Tips and all members who reply.
 
Ok nice form, but how and where do you want to store it? Database? and if yes which database?

Some people can learn, some people can teach.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top