Request More Information


 
StartForm("NyackRequest", "", "POST", "100%"); $f->custom_script=" function SetHiddenFields() { var radios = document.getElementsByName('Campus'); var hiddenVal = '' for (var i = 0, length = radios.length; i < length; i++) { if (radios[i].checked) { // do whatever you want with the checked radio hiddenVal = radios[i].value; // only one radio can be logically checked, don't check the rest break; } } document.NyackRequest.Team.value = hiddenVal document.NyackRequest.intteam.value = hiddenVal } function SetCampus() { var e = document.getElementById('IntendedMajor'); var substring = e.options[e.selectedIndex].value; //check if this program is available online var string4 = document.getElementById('online_list').value; if(string4.indexOf(substring) !== -1) { var rbtn = document.getElementById('Campus-6'); rbtn.style.display = 'block'; // 'block' or 'inline' if you want to show. } else { var rbtn = document.getElementById('Campus-6'); rbtn.style.display = 'none'; // 'block' or 'inline' if you want to show. } //check if this program is available at Rockland var string5 = document.getElementById('rockland_list').value; if(string5.indexOf(substring) !== -1) { var rbtn = document.getElementById('Campus-4'); rbtn.style.display = 'block'; // 'block' or 'inline' if you want to show. } else { var rbtn = document.getElementById('Campus-4'); rbtn.style.display = 'none'; // 'block' or 'inline' if you want to show. } //check if this program is available in NYC var string6 = document.getElementById('nyc_list').value; if(string6.indexOf(substring) !== -1) { var rbtn = document.getElementById('Campus-5'); rbtn.style.display = 'block'; // 'block' or 'inline' if you want to show. } else { var rbtn = document.getElementById('Campus-5'); rbtn.style.display = 'none'; // 'block' or 'inline' if you want to show. } //adding one more thing: unselect all radio buttons to require new selection buttonGroup = document.NyackRequest.Campus; for (i=0; i < buttonGroup.length; i++) { if (buttonGroup[i].checked == true) { // if a button in group is checked, buttonGroup[i].checked = false; // uncheck it } } } function loadCampus() { var e = document.getElementById('IntendedMajor'); var substring = e.options[e.selectedIndex].value; //check if the selected program is available online var string4 = document.getElementById('online_list').value; if(string4.indexOf(substring) !== -1) { var rbtn = document.getElementById('Campus-6'); rbtn.style.display = 'block'; // 'block' or 'inline' if you want to show. } else { var rbtn = document.getElementById('Campus-6'); rbtn.style.display = 'none'; // 'block' or 'inline' if you want to show. } //also, while we're here, check if this program is available at Rockland var string5 = document.getElementById('rockland_list').value; if(string5.indexOf(substring) !== -1) { var rbtn = document.getElementById('Campus-4'); rbtn.style.display = 'block'; // 'block' or 'inline' if you want to show. } else { var rbtn = document.getElementById('Campus-4'); rbtn.style.display = 'none'; // 'block' or 'inline' if you want to show. } //also, while we're here, check if this program is available in NYC var string6 = document.getElementById('nyc_list').value; if(string6.indexOf(substring) !== -1) { var rbtn = document.getElementById('Campus-5'); rbtn.style.display = 'block'; // 'block' or 'inline' if you want to show. } else { var rbtn = document.getElementById('Campus-5'); rbtn.style.display = 'none'; // 'block' or 'inline' if you want to show. } } window.onload = loadCampus; "; $f->AddField("FName", "First Name:", "text_cap", "", 20); $f->RequireField("FName", "text", "Please provide your first name"); $f->AddField("LName", "Last Name:", "text_cap", "", 20); $f->RequireField("LName", "text", "Please provide your last name"); $f->AddField("Email", "Email Address:", "text", "", 30); $f->RequireField("Email", "email", "Please provide your valid email address"); $f->AddField("Address", "Address:", "text_cap"); $f->AddField("City", "City:", "text_cap"); $f->AddStateRFI("State", "State:"); $f->AddField("Zip", "Postal Code:", "text", "", 15); //$f->RequireField("Zip", "zip", "Please enter a valid US Zip Code OR leave the field blank."); $f->RequireField("Zip", "text", "Please enter a valid Postal Code."); $f->AddCountryRFI("Country"); $f->AddField("MobilePhone", "Cell Phone Number:", "text", "", 20); $f->RequireField("MobilePhone", "text", "Please provide your cell or home phone number."); $f->AddField("TxtConsent", "", "checkbox2", array("I give permission to Nyack College/Alliance Theological Seminary to send me important updates via text messaging."=>"Yes")); //NEW 6/20/17 - adding a loop - we need to assemble lists of which programs are available at which campuses $online_list=""; $rockland_list=""; $nyc_list=""; //also create three empty text variables to hold hidden lists of programs in LeadCategories (just in case - not using these here now) $freshman_list=""; $graduate_list=""; $adult_list=""; //and assemble array of programs for IntendedMajor dropdown $progs=array(); $where = "WHERE `Lead-Category` = 'Freshman' "; DBConnect(); $Query=mysql_query("SELECT * FROM `RFI_PROGRAMS_2016_LEADBOX` ".$where."ORDER BY `Name` ASC"); do { if($row!="") { $pro=$row['Name']; //this is the simple value needed by Talisma $label=$row['Name']; $rockland=$row['Campus-Rockland']; $nyc=$row['Campus-Manhattan']; $online=$row['Campus-Online']; //add it to the array if($pro!="") $progs[$label]=$pro; //also - if it's avail online, rockland, nyc, add to hidden list if($online=="Yes") $online_list.=$pro." "; if($rockland=="Yes") $rockland_list.=$pro." "; if($nyc=="Yes") $nyc_list.=$pro." "; //let's create hidden fields containing the Lead-Category for each if($row['Lead-Category']=="Freshman") $freshman_list.=$pro." "; elseif($row['Lead-Category']=="Graduate") $graduate_list.=$pro." "; elseif($row['Lead-Category']=="Adult Degree Completion") $adult_list.=$pro." "; } } while ($row=mysql_fetch_assoc($Query)); //adding hidden lists of online programs for this box $f->AddField("online_list", "online_list", "hidden", $online_list); $f->AddField("rockland_list", "rockland_list", "hidden", $rockland_list); $f->AddField("nyc_list", "nyc_list", "hidden", $nyc_list); //add hidden lists of degrees by lead-category $f->AddField("freshman_list", "freshman_list", "hidden", $freshman_list); $f->AddField("graduate_list", "graduate_list", "hidden", $graduate_list); $f->AddField("adult_list", "adult_list", "hidden", $adult_list); $f->AddField("IntendedMajor", "Program of Interest:", "select", $progs, "100%", "", "", "", "", "SetCampus()"); //moving campus here so it can be dynamic - based on choice of major $f->AddField("Campus", "Which campus?:", "radio", array("Nyack, NY Residential Campus"=>"4", "New York City Commuter Campus"=>"5", "Online"=>"6"), "", "", "", "", "", "SetHiddenFields()"); $f->RequireField("Campus", "radio", "Please indicate which campus you are interested in"); //new July 2017 - checking for LeadSource, from $_SESSION variable $the_source=""; $sources=array("facebook"=>"954", "instagram"=>"1220", "twitter"=>"1204", "lifeatnyack"=>"1184", "youtube"=>"1217", "google"=>"1179", "google_ad"=>"1224", "sage"=>"1225"); if(isset($_SESSION['source'])) { $sourcy=$_SESSION['source']; $the_source=$sources[$sourcy]; } elseif(isset($_COOKIE['LeadSource'])) { $sourcy=$_COOKIE['LeadSource']; $the_source=$sources[$sourcy]; } //if $the_source was set, we have a parameter or cookie lead source if($the_source!="") { $f->AddField("LeadSource", "LeadSource", "hidden", $the_source); //if not, ask the user for their source } else { $f->AddLeadSourceRFI("LeadSource", "How did you originally hear about Nyack College?"); } $f->AddTermsRFI_Trad(); $f->AddField("intmessage", "Questions/Comment:", "textarea"); $f->AddField("Team", "Team", "hidden", "0"); //same as Campus $f->AddField("intteam", "intteam", "hidden", "0"); //same as Campus $f->AddField("MethodofContact", "MethodofContact", "hidden", "RFI electronic Nyack web"); $f->AddField("Campaign", "Campaign", "hidden", htmlentities($_SESSION['campaign'], ENT_QUOTES)); $f->AddField("LeadCategory", "LeadCategory", "hidden", "Freshman"); //$f->AddField("LeadCategory", "LeadCategory", "hidden", "Graduate"); //$f->AddField("LeadCategory", "LeadCategory", "hidden", "Adult Degree Completion"); $f->AddField("Website", "Website", "hidden", $_SERVER["REQUEST_URI"]); //if utm_source is present, this person has come from a Google Ad if(isset($_COOKIE['GoogleSource'])) $f->AddField("vendor", "vendor", "hidden", "Google Ad"); //if utm_term is present, this person came from a Google Ad if(isset($_COOKIE['GoogleTerms'])) $f->AddField("keywords", "keywords", "hidden", $_COOKIE['GoogleTerms']); //if utm_medium is present, this person came from a Google Ad if(isset($_COOKIE['GoogleSubCampaign'])) $f->AddField("subcampaign", "subcampaign", "hidden", $_COOKIE['GoogleSubCampaign']); $f->AddReCaptcha(); $f->AddField("submitted", "submitted", "hidden", "true"); $f->EndForm("submit request", "no", "", "yes"); $f->CompileForm(); $output .= $f->form_html; echo $output; ?>