<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Arial Black";
        panose-1:2 11 10 4 2 1 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        line-height:150%;
        font-size:10.0pt;
        font-family:Arial;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.Style1, li.Style1, div.Style1
        {margin:0in;
        margin-bottom:.0001pt;
        line-height:150%;
        font-size:10.0pt;
        font-family:Arial;
        color:black;
        font-weight:bold;}
span.StyleArial10ptBlack
        {font-family:"Courier New";
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-compose;
        font-family:"Courier New";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
@page Section1
        {size:8.5in 11.0in;
        margin:.2in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>I am doing a networking site
for some one that is targeting college students. It is important that they have
a campus associated with their account. I need a little advice as to how best
to approach this.</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>I have a database table of
campuses that includes a state field. My first take was to add some JavaScript
in the registration form. Users select a state from a select list, which uses </span></font><st1:place
w:st="on"><st1:City w:st="on">AJAX</st1:City></st1:place>&nbsp;<font
face="Courier New"><span style='font-family:"Courier New"'>to populate a div
with a list of links for that state. Choosing a link then in turn gives a
visual indication that a campus has been chosen and populates a hidden input
value which was empty, etc. etc. This was not too tough using jQuery and what
have you.</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>I used something like this:<o:p></o:p></span></font></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>function
campus_validate($form, &amp;$form_state){</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if($form_state['values']['campus']==&quot;&quot;){</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
drupal_set_message(t('Please select a state and campus'));</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return false;</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return true;</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>}</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face=Arial><span
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>function
user_form_alter(&amp;$form, $form_state, $form_id) {</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($form_id == 'user_register') {</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$form['Personal']['campus'] = array(</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; '#type' =&gt; 'hidden',</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; '#default_value' =&gt; &quot;&quot;,</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; '#required' =&gt; TRUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></font><o:p></o:p></p>

<p class=MsoNormal style='text-indent:.5in;line-height:20.1pt'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>);</span></font><o:p></o:p></p>

<p class=MsoNormal style='text-indent:.5in;line-height:20.1pt'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>//
the following are not correct, but the idea is I need to validate the extra
fields I am adding. I can muddle through these.</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$form['Personal']['campus']['#element_validate'] = array('campus_validate');</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// $form['profile_sex']['#element_validate'] = array('sex_validate');</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>}</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>So I think you can see where
I am going with this although it isn&#8217;t complete.</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>The next thing I want to do,
is I prefer to add a tab for editing the users&#8217; campus. I prefer this to
adding to the user/edit form. Once again, I will need to have a state select
that will use</span></font>&nbsp;<st1:place w:st="on"><st1:City w:st="on"><font
  face="Courier New"><span style='font-family:"Courier New"'>AJAX</span></font></st1:City></st1:place>&nbsp;<font
face="Courier New"><span style='font-family:"Courier New"'>to query and provide
a list. Fortunately, I can probably reuse a lot of the code from the
registration form. Can someone please suggest how to add a tab to /user, and if
you have any suggestions as to making this less labor-intensive, that would be
super!</span></font>&nbsp;<font face=Wingdings><span style='font-family:Wingdings'>J</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>If the whole thing should be
tossed, and go with multi-step submissions, please point me the right way on
that.</span></font><o:p></o:p></p>

<p class=MsoNormal style='line-height:20.1pt'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>Thank you so much.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
line-height:150%;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
line-height:150%;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
line-height:150%'><span style='line-height:150%'>Kindest Regards,<o:p></o:p></span></span></font></p>

<p class=MsoNormal style='line-height:200%'><st1:City w:st="on"><st1:place
 w:st="on"><font size=2 face=Arial><span style='font-size:10.0pt;line-height:
  200%'><span style='line-height:200%'>Dayton</span></span></font></st1:place></st1:City>
Perkins<o:p></o:p></p>

<p class=MsoNormal align=center style='text-align:center;line-height:200%'><font
size=2 face="Arial Black"><span style='font-size:10.0pt;line-height:200%;
font-family:"Arial Black"'><span style='line-height:200%'>Good News Design<o:p></o:p></span></span></font></p>

<p class=MsoNormal align=center style='text-align:center'><font size=2
color="#8000ff" face="Arial Black"><span style='font-size:10.0pt;line-height:
150%;font-family:"Arial Black";color:#8000FF'>Interactive&nbsp; Web sites for
business</span></font><font face="Times New Roman"><span style='font-family:
"Times New Roman"'><o:p></o:p></span></font></p>

<p class=MsoAutoSig align=center style='text-align:center;line-height:150%'><font
size=3 face=Arial><span style='font-size:12.0pt;line-height:150%;font-family:
Arial'><a href="mailto:dayton@goodnewsdesign.com">mailto:dayton@goodnewsdesign.com</a><o:p></o:p></span></font></p>

<p class=MsoAutoSig align=center style='text-align:center;line-height:150%'><font
size=3 face=Arial><span style='font-size:12.0pt;line-height:150%;font-family:
Arial'><a href="http://goodnewsdesign.com/">http://goodnewsdesign.com</a><o:p></o:p></span></font></p>

<p class=MsoAutoSig align=center style='text-align:center;line-height:150%'><font
size=3 face=Arial><span style='font-size:12.0pt;line-height:150%;font-family:
Arial'>Phone:&nbsp; 616-399-5617</span></font><o:p></o:p></p>

<p class=MsoAutoSig align=center style='text-align:center;line-height:150%'><font
size=3 face=Arial><span style='font-size:12.0pt;line-height:150%;font-family:
Arial'>Cell: 616-405-6360<o:p></o:p></span></font></p>

<p class=MsoAutoSig align=center style='text-align:center;line-height:150%'><st1:Street
w:st="on"><st1:address w:st="on"><font size=3 face=Arial><span
  style='font-size:12.0pt;line-height:150%;font-family:Arial'>3611 Butternut
  Drive</span></font></st1:address></st1:Street><font face=Arial><span
style='font-family:Arial'> <st1:place w:st="on">Lot</st1:place> 40<o:p></o:p></span></font></p>

<p class=MsoAutoSig align=center style='text-align:center;line-height:150%'><st1:place
w:st="on"><st1:City w:st="on"><font size=3 face=Arial><span style='font-size:
  12.0pt;line-height:150%;font-family:Arial'>Holland</span></font></st1:City><font
 face=Arial><span style='font-family:Arial'> <st1:State w:st="on">MI</st1:State>
 <st1:PostalCode w:st="on">49424</st1:PostalCode></span></font></st1:place><font
face=Arial><span style='font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font face="Times New Roman"><span style='font-family:"Times New Roman"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><o:p>&nbsp;</o:p></font></p>

</div>

</body>

</html>