|
|
Hi all,
I need to allow a user to fill out some forms with the following info: Name,
Title, Supervisor, Division, Status, Salary, Effective Date and Remarks. After
filling out the info, it needs to be sent via a link that will allow the
recipient access to the table to edit if necessary. Then the recipient can
'Approve' or 'Deny' the information and send it back for review and
distribution by the original sender.
The forms are already complete but I'm confused as to how the emailing and
editable fields will work. I already have a CFMAIL page completed that used to
display the information once it was input then simply mail it to the recipient.
Well, now, the user wants the ability to have the recipient edit the
information then email it back so that they can distribute it. So now I have
to use a DB table, whereas before, it was just being sent as an email. So I've
created the table with the columns for the info I mentioned before. What I'm
confused with is how to make the transfer from just emailing information, to
emailing a link that will allow the recipient to access the table, edit it if
necessary, then Approve or Deny it and send it back in the same format. The
Approval can simply be in the form of a field.
So I basically need to make it so that I'm taking this and making it into an
editable table via a link sent though an email after the user has filled out
the necessary information in the forms before. Sorry for all the explaining
and confusion. I've attached some code to look at and modify. I can provide
more code from the form input pages if you'd like though I figured the logic of
the email and the ability to allow the recipient to update the DB then actually
send it back is in the page I attached. It's probably not as bad as it looks
or sounds but it's confusing the hell out of me...
Thanks a ton,
Eric
<cfif isDefined("Form.submit") and trim(form.submit) eq "Send Mail">
<cftry>
<cfif isDefined("form.send1")>
<cfmail
from="#form.from1#"
to="#form.to1#"
cc="#form.cc1#"
bcc=""
subject="#form.subject1#"
>#form.body1#</cfmail>
Confirmation Email Has Been Sent<br />
</cfif>
<cfcatch>
<cfinclude template="/system/server_msgs/error_page_include.cfm">
</cfcatch>
</cftry>
<cfoutput>Return To Input Form - <a
href="HRstatusChange.cfm">Home</a></cfoutput>
<cfelse>
<cfoutput>
<form action="HRmailStatus.cfm" method="post">
Personnel Status Change Email
<table>
<tr>
<td>Send? <input type="checkbox" name="send1"
value="1" checked="yes"></td>
<td>To: <input type="text" name="to1"
value="somebody@xxxxxxxxxx" class="smallinput"></td>
<td>From: <input type="text" name="From1"
value="somebody@xxxxxxxxxx" class="smallinput"></td>
<td>CC: <input type="text" name="cc1" class="smallinput"
value="" /></td>
</tr>
<tr>
<td colspan="4">
Subject:
<input type="text" name="subject1" value="Personnel
Status Change: #request.eid2cn(form.eid)#" class="smallinput"
size="40">
</td>
</tr>
<tr>
<td colspan="4">
<textarea cols="60"
rows="20"
name="body1" class="smallinput">Personnel Status Change:
Name: #request.eid2cn(form.eid)#
Title: #form.title#
Supervisor: #request.eid2cn(request.emp_attrib(1015, form.eid))#
Division: #form.division#
Status: #form.status#
Salary: #form.salary#
Effective Date: #form.effectiveDate#
Remarks: #form.remarks#
Please Confirm.
</textarea>
</td>
</tr>
</table>
<input type="Submit" name="submit" value="Send Mail">
</form></cfoutput>
</cfif>
|
|