1 neenan 1.1 <!--- Name: dsp_addcontact.cfm
2 Purpose: This file displays the form variables for adding new contacts to the program. It is called each time
3 a user selects "YES" to add one or more contacts.It also transfers all the form variables to act_addcontact.cfm
4 and the actual action of inserting the data into the table(contact) happens in act_addcontact.cfm
5 Date created: 02/23/2005
6 Dependancy: StoreDate - a date key from the previous act_addorg action page to resolve the conflict between the different users using the same Index.cfm page.
7 OrgID
8 Variables: getOrgID.OrganizationName and GetOrgID.OrgId are used to display newly added organization name and ID.
9 Primary - Primary contact or not
10 FirstName - First Name of the contact(Required)
11 Middle - Middle name of the contact if applicable.
12 LastName - Phone Number of the organization (Required)
13 NameSuffix - Suffix such as Mr, Mrs or Miss
14 Title - Title of the contact
15 Address - Postal address of the contact
16 City- Contact's city name
17 Zip - Zip code for the contact's address
18 Country - Country of official residence.
19 WorkPhone_Area - Work Phone Area Number of the contact
20 WorkPhone_Prefix - Work Phone Prefix of the contact
21 WorkPhone_Num - Work Phone Number of the contact
22 neenan 1.1 WorkExtension - Extension if applicable
23 FaxNumber_Area - Fax Area Number of the contact
24 FaxNumber_Prefix - Fax Number Prefix of the contact
25 FaxNumber_Num - Fax Number of the contact
26 MobilePhone_Area - Mobile Phone Area of the contact
27 MobilePhone_Prefix - Mobile Phone Prefix of the contact
28 MobilePhone_Num - Mobile Phone Number of the contact
29 EmailName - Email of the contact
30
31 Functions:
32 Date changed:
|
33 pKanel 1.3 02/23/2005 Prabin & Neena creation and Documentation
34 08/22/2005 Prabin added cfoutput to get the list of states and
35 select state depending upon organization's
36 state.
37 --->
38
|
39 neenan 1.1
40 <cfoutput>
41 <cfquery name="GetOrgID" datasource="#ProgramsDB#">
|
42 pKanel 1.3 Select orgid,organizationname,stateOrProvince
|
43 neenan 1.1 From dOrganization
|
44 pKanel 1.3 Where times like '#storedate#'
|
45 neenan 1.1 </cfquery>
46 </cfoutput>
47
48
|
49 pKanel 1.3 <cfquery name="contactinfo" datasource="#ProgramsDB#">
|
50 neenan 1.1 Select *
51 From dOrganization
|
52 pKanel 1.3 Where orgid = #getorgid.orgid#
|
53 neenan 1.1 </cfquery>
54
55
|
56 pKanel 1.3 <!--- <cfif #URL.fuseaction# is "AddContacts">
57
58 <cfset var1 = "setfocus1('addContact')">
59
60 </cfif> --->
61
|
62 neenan 1.1 <!-- #BeginEditable "Content" -->
63 <table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
64 <tr>
65 <td>
66 <p>
|
67 pKanel 1.3 <span class="subheading">
68 ADD A PROGRAM <img src="../images/siteimage/dart.gif" border="0">
69 CONTACT PERSON INFO <img src="../images/siteimage/dart.gif" border="0"></span>
70 <span class="sublink2">Step 2 <img src="../images/siteimage/dart.gif" border="0"></span><br><br>
71 <span class="redtext"><font style="color: red">* Required Fields</font></span><br><br>
|
72 neenan 1.1
73 <cfoutput>Organization Name: <strong>#getORGID.OrganizationName#</strong></cfoutput><br><br>
|
74 pKanel 1.3 <form name="addContact" action="addeditprograms.cfm?fuseaction=AddMoreContacts&OrgID=<cfoutput>#getOrgID.OrgID#</cfoutput>" onsubmit="return nameValidate(this)" method="post">
|
75 neenan 1.1
76 <table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
77 <tr>
78 <td><div class="formtext">Primary ? <font style="color: red" size="-1">* </font><a href="javascript:newWindow ('help1.cfm')"><font style="color: red" size="-1">Help</font></a></td>
79 <td><input type="checkbox" name="Primary" value="1"></div></td>
80 </tr>
|
81 pKanel 1.3 <cfoutput query="ContactInfo">
82 <cfset phone = #contactinfo.phone#>
|
83 neenan 1.1 <tr>
84 <td><div class="formtext">Prefix</td>
|
85 pKanel 1.3 <td><input type="text" name="Prefix" size="4"></div>
86 <input type="hidden" size="3" name="statename" value="#contactinfo.StateOrProvince#"></td>
|
87 neenan 1.1 </tr>
|
88 pKanel 1.3
|
89 neenan 1.1 <tr>
90 <td><div class="formtext">First Name <font style="color: red">*</font></td>
|
91 pKanel 1.3 <td><input type="text" size="15" name="FirstName" onfocus="return getStateOption('addContact')">
|
92 neenan 1.1 <input type="hidden" name="FirstName_required" value="Please enter contact person's first name, or enter 'n/a'.">
93 </td>
94 </tr>
95 <tr>
96 <td><div class="formtext">Middle</td>
97 <td><input type="text" size="1" name="Middle"></div></td>
98 </tr>
99 <tr>
100 <td><div class="formtext">Last Name <font style="color: red">*</font></td>
101 <td><input type="text" size="15" name="LastName">
102 <input type="hidden" name="LastName_required" value="Please enter contact person's last name, or enter 'n/a'.">
103 </td>
104 </tr>
105 <tr>
106 <td><div class="formtext">Suffix </td>
107 <td><input type="text" size="5" name="NameSuffix"></td>
108 </tr>
109 <tr>
110 <td><div class="formtext">Title</td>
111 <td><input type="text" size="20" name="Title"></td>
112 </tr>
|
113 pKanel 1.3
|
114 neenan 1.1 <tr>
115 <td><div class="formtext">Address</td>
116 <td>
117 <input type="text" size="25" name="Address" value="#contactinfo.Address1#">
|
118 pKanel 1.3
|
119 neenan 1.1 </div>
120 </td>
121 </tr>
122 <tr>
123 <td><div class="formtext">City</td>
124 <td align="justified" nowrap>
125 <input type="text" size="25" name="City" value="#contactinfo.City#"></div>
126 </td>
127 </tr>
|
128 pKanel 1.3 </cfoutput>
|
129 neenan 1.1 <tr>
130 <td><div class="formtext">State</td>
|
131 pKanel 1.3 <td><!--- <select name="State">
132 <option value="AL"> Alabama</option>
|
133 neenan 1.1 <option value="AK"> Alaska</option>
134 <option value="AZ"> Arizona</option>
135 <option value="AR"> Arkansas</option>
136 <option value="CA"> California</option>
137 <option value="CO"> Colorado</option>
138 <option value="CT"> Connecticut</option>
139 <option value="DE"> Delaware</option>
140 <option value="DC"> District of Columbia</option>
141 <option value="FL"> Florida</option>
142 <option value="GA"> Georgia</option>
143 <option value="HI"> Hawaii</option>
144 <option value="ID"> Idaho</option>
145 <option value="IL"> Illinois</option>
146 <option value="IN"> Indiana</option>
147 <option value="IA"> Iowa</option>
148 <option value="KS"> Kansas</option>
149 <option value="KY"> Kentucky</option>
150 <option value="LA"> Louisiana</option>
151 <option value="ME"> Maine</option>
152 <option value="MD"> Maryland</option>
153 <option value="MA"> Massachusetts</option>
154 neenan 1.1 <option value="MI"> Michigan</option>
155 <option value="MN"> Minnesota</option>
156 <option value="MS"> Mississippi</option>
157 <option value="MO"> Missouri</option>
158 <option value="MT"> Montana</option>
159 <option value="NE"> Nebraska</option>
160 <option value="NV"> Nevada</option>
161 <option value="NH"> New Hampshire</option>
162 <option value="NJ"> New Jersey</option>
163 <option value="NM"> New Mexico</option>
164 <option value="NY"> New York</option>
165 <option value="NC"> North Carolina</option>
166 <option value="ND"> North Dakota</option>
167 <option value="OH"> Ohio</option>
168 <option value="OK"> Oklahoma</option>
169 <option value="OR"> Oregon</option>
170 <option value="PA"> Pennsylvania</option>
171 <option value="RI"> Rhode Island</option>
172 <option value="SC"> South Carolina</option>
173 <option value="SD"> South Dakota</option>
174 <option value="TN"> Tennessee</option>
175 neenan 1.1 <option value="TX"> Texas</option>
176 <option value="UT"> Utah</option>
177 <option value="VT"> Vermont</option>
178 <option value="VA"> Virginia</option>
179 <option value="WA"> Washington</option>
180 <option value="WV"> West Virginia</option>
181 <option value="WI"> Wisconsin</option>
182 <option value="WY"> Wyoming</option>
183 <option value="Other"> Other</option>
|
184 pKanel 1.3 </select> --->
185
186 <select name="State">
187 <cfoutput query="getState">
188 <option value="#Abbr#" <cfif #Abbr# EQ #contactinfo.StateOrProvince#> selected </cfif>>#State#</option>
189 </cfoutput>
190 </select>
191
192
193
194 </div>
195
|
196 neenan 1.1 </td>
197 </tr>
|
198 pKanel 1.3 <cfoutput>
|
199 neenan 1.1 <tr>
200 <td><div class="formtext">Zip</td>
201 <td align="justified" nowrap>
202 <input type="text" size="10" name="Zip" value="#contactinfo.PostalCode#"></div>
203 </td>
204 </tr>
205 <tr>
206 <td><div class="formtext">Country </td>
207 <td><input type="text" size="18" name="Country" value="United States" value="#contactinfo.country#"></div>
208 </td>
209 </tr>
210
211
212 <tr>
213 <td><div class="formtext">Work Phone</td>
214
215 <td><input type="Text" size="3" value="#gettoken(phone,1,"-")#" maxlength="3" name="WorkPhone_Area">-
216 <input type="Text" size="3" value="#gettoken(phone,2,"-")#" maxlength="3" name="WorkPhone_Prefix">-
217 <input type="Text" size="4" value="#gettoken(phone,3,"-")#" maxlength="4" name="WorkPhone_Num">
218 <font class="formtext">Ext.</font>
219 <input type="text" size="5" value="#contactinfo.Extension#" name="WorkExtension">
220 neenan 1.1 </td>
221 </tr>
|
222 pKanel 1.3 <cfset fax = #contactInfo.Faxnumber# >
|
223 neenan 1.1 <tr>
224 <td><div class="formtext">Fax</td>
225 <td><input type="Text" size="3" value="#gettoken(fax,1,"-")#" maxlength="3" name="FaxNumber_Area">-
226 <input type="Text" size="3" value="#gettoken(fax,2,"-")#" maxlength="3" name="FaxNumber_Prefix">-
227 <input type="Text" size="4" value="#gettoken(fax,3,"-")#" maxlength="4" name="FaxNumber_Num"></div>
228 </td>
229 </tr>
230 <tr>
231 <td><div class="formtext">Mobile Phone</td>
232 <td><input type="Text" size="3" maxlength="3" name="MobilePhone_Area">-
233 <input type="Text" size="3" maxlength="3" name="MobilePhone_Prefix">-
234 <input type="Text" size="4" maxlength="4" name="MobilePhone_Num"></div>
235 </td>
236 </tr>
237 <tr>
238 <td><div class="formtext">Email</td>
239 <td colspan="3"><input type="text" size="40" name="EmailName"></div></td>
240 </tr>
241 <tr>
242 <td> </td>
243 </tr>
244 neenan 1.1 </cfoutput>
245 <tr>
246 <td> </td>
247 <td><div class="formtext">
|
248 pKanel 1.3 <!--- <cfoutput><cfinput type="hidden" name="storedate" value="#getorgid.times#"></cfoutput> --->
249 <input type="submit" value="Add Contacts">
250 <input type="reset" value="Reset"></div>
|
251 neenan 1.1 </td>
252 </tr>
253 </table>
254 </form>
255
256 </td>
257 </tr>
258 </table>
259 </p>
|
260 pKanel 1.3
261
|