Skip to content

Instantly share code, notes, and snippets.

/html

Created December 27, 2016 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9d23873f07829f7d1e87390577c6eda1 to your computer and use it in GitHub Desktop.
Save anonymous/9d23873f07829f7d1e87390577c6eda1 to your computer and use it in GitHub Desktop.
first cf7 error (case eval)
<div class="row">
<div class="col-md-4">
<p> [text* first_name placeholder "First Name*"] </p>
<p> [text address placeholder "Street Address"] </p>
<p> [text* zip_code placeholder "Zip Code*"] </p>
<p style="min-width:317%"> [textarea* case_details placeholder "Case Details"] </p>
</div>
<div class="col-md-4">
<p> [text* last_name placeholder "Last Name*"] </p>
<p> [text* city placeholder "City"] </p>
<p> [tel* telephone_number placeholder "Phone Number"] </p>
</div>
<div class="col-md-4">
<p> [email* email_address placeholder "Email*"] </p>
<p class="state"> [select* State "state*" "AL" "AK" "AS" "AZ" "AR" "CA" "CO" "CT" "DE" "DC" "FM" "FL" "GA" "GU" "HI" "ID" "IL" "IN" "IA" "KS" "KY" "LA" "ME" "MH" "MD" "MA" "MI" "MN" "MS" "MO" "MT" "NE" "NV" "NH" "NJ" "NM" "NY" "NC" "ND" "MP" "OH" "OK" "OR" "PW" "PA" "PR" "RI" "SC" "SD" "TN" "TX" "UT" "VT" "VI" "VA" "WA" "WV" "WI" "WY"] </p>
<p> [tel* telephone_number placeholder "Phone Number"] </p>
<div class="row">
<!-- <div class="col-md-4">-->
</div> </div>
<script type="text/javascript">
jQuery(document).ready(jQuery(function() {
var availableTags = [
"Anderson County, Palestine",
"Andrews County, Andrews",
"Angelina County, Lufkin",
"Aransas County, Rockport",
"Archer County, Archer City",
"Armstrong County, Claude",
"Atascosa County, Jourdanton",
"Austin County, Bellville",
"Bailey County, Muleshoe",
"Bandera County, Bandera",
"Bastrop County, Bastrop",
"Baylor County, Seymour",
"Bee County, Beeville",
"Bell County, Belton",
"Bexar County, San Antonio",
"Blanco County, Johnson City",
"Borden County, Gail",
"Bosque County, Meridian",
"Bowie County, Boston",
"Brazoria County, Angleton",
"Brazos County, Bryan",
"Brewster County, Alpine",
"Briscoe County, Silverton",
"Brooks County, Falfurrias",
"Brown County, Brownwood",
"Burleson County, Caldwell",
"Burnet County, Burnet",
"Caldwell County, Lockhart",
"Calhoun County, Port Lavaca",
"Callahan County, Baird",
"Cameron County, Brownsville",
"Camp County, Pittsburg",
"Carson County, Panhandle",
"Cass County, Linden",
"Castro County, Dimmitt",
"Chambers County, Anahuac",
"Cherokee County, Rusk",
"Childress County, Childress",
"Clay County, Henrietta",
"Cochran County, Morton",
"Coke County, Robert Lee",
"Coleman County, Coleman",
"Collin County, McKinney",
"Collingsworth County, Wellington",
"Colorado County, Columbus",
"Comal County, New Braunfels",
"Comanche County, Comanche",
"Concho County, Paint Rock",
"Cooke County, Gainesville",
"Coryell County, Gatesville",
"Cottle County, Paducah",
"Crane County, Crane",
"Crockett County, Ozona",
"County, Crosbyton",
"Culberson County, Van Horn",
"Dallam County, Dalhart",
"Dallas County, Dallas",
"Dawson County, Lamesa",
"Deaf Smith County, Hereford",
"Delta County, Cooper",
"Denton County, Denton",
"DeWitt County, Cuero",
"Dickens County, Dickens",
"Dimmit County, Carrizo Springs",
"Donley County, Clarendon",
"Duval County, San Diego",
"Eastland County, Eastland",
"Ector County, Odessa",
"Edwards County, Rocksprings",
"Ellis County, Waxahachie",
"El Paso County, El Paso",
"Erath County, Stephenville",
"Falls County, Marlin",
"Fannin County, Bonham",
"Fayette County, La Grange",
"Fisher County, Roby",
"Floyd County, Floydada",
"Foard County, Crowell",
"Fort Bend County, Richmond",
"Franklin County, Mount Vernon",
"Freestone County, Fairfield",
"Frio County, Pearsall",
"Gaines County, Seminole",
"Galveston County, Galveston",
"Garza County, Post",
"Gillespie County, Fredericksburg",
"Glassock County, Garden City",
"Goliad County, Goliad",
"Gonzales County, Gonzales",
"Gray County, Pampa",
"Grayson County, Sherman",
"Gregg County, Longview",
"Grimes County, Anderson",
"Guadalupe County, Seguin",
"Hale County, Plainview",
"Hall County, Memphis",
"Hamilton County, Hamilton",
"Hansford County, Spearman",
"Hardeman County, Quanah",
"Hardin County, Kountze",
"County, Houston",
"Harrison County, Marshall",
"Hartley County, Channing",
"Haskell County, Haskell",
"Hays County, San Marcos",
"Hemphill County, Canadian",
"Henderson County, Athens",
"Hidalgo County, Edinburg",
"Hill County, Hillsboro",
"Hockley County, Levelland",
"Hood County, Granbury",
"Hopkins County, Sulphur Springs",
"Houston County, Crockett",
"Howard County, Big Springs",
"Hudspeth County, Sierra Blanca",
"Hunt County, Greenville",
"Hutchinson County, Stinnett",
"Irion County, Mertzon",
"Jack County, Jacksboro ",
"Jackson County, Edna",
"Jasper County, Jasper",
"Jeff Davis County, Fort Davis",
"Jefferson County, Beaumont",
"Jim Hogg County, Hebbronville",
"Jim Wells County, Alice",
"Johnson County, Cleburne",
"Jones County, Anson",
"Karnes County, Karnes City",
"Kaufman County, Kaufman",
"Kendall County, Boerne",
"Kenedy County, Sarita",
"Kent County, Jayton",
"Kerr County, Kerrville",
"Kimble County, Junction",
"King County, Guthrie",
"Kinney County, Brackettville",
"Kleberg County, Kingsville",
"Knox County, Benjamin",
"Lamar County, Paris",
"Lamb County, Littlefield",
"Lampasas County, Lampasas",
"La Salle County, Cotulla",
"Lavaca County, Hallettsville",
"Lee County, Giddings",
"Leon County, Centerville",
"Liberty County, Liberty",
"Limestone County, Groesbeck",
"Lipscomb County, Lipscomb",
"Live Oak County, George West",
"Llano County, Llano",
"Loving County, Mentone ",
"Lubbock County, Lubbock",
"Lynn County, Tahoka",
"McCulloch County, Brady",
"McLennan County, Waco",
"McMullen County, Tilden",
"Madison County, Madisonville",
"Marion County, Jefferson",
"Martin County, Stanton",
"Mason County, Mason",
"Matagorda County, Bay City",
"Maverick County, Eagle Pass ",
"Medina County, Hondo",
"Menard County, Menard",
"Midland County, Midland",
"Milam County, Cameron",
"Mills County, Goldthwaite",
"Mitchell County, Colorado City",
"Montague County, Montague",
"Montgomery County, Conroe",
"Moore County, Dumas",
"Morris County, Daingerfield",
"Motley County, Matador",
"Nacogdoches County, Nacogdoches",
"Navarro County, Corsicana",
"Newton County, Newton",
"Nolan County, Sweetwater",
"Nueces County, Corpus Christi",
"Ochiltree County, Perryton",
"Oldham County, Vega",
"Orange County, Orange",
"Palo Pinto County, Palo Pinto",
"Panola County, Carthage",
"Parker County, Weatherford",
"Parmer County, Farwell",
"Pecos County, Fort Stockton",
"Polk County, Livingston",
"Potter County, Amarillo",
"Presidio County, Marfa",
"Rains County, Emory",
"County, Canyon",
"Reagan County, Big Lake",
"Real County, Leakey",
"Red River County, Clarksville",
"Reeves County, Pecos",
"Refugio County, Refugio",
"Roberts County, Miami",
"Robertson County, Franklin",
"Rockwall County, Rockwall",
"Runnels County, Ballinger",
"Rusk County, Henderson",
"Sabine County, Hemphill",
"San Augustine County, San Augustine",
"San Jacinto County, Coldspring",
"San Patricio County, Sinton",
"San Saba County, San Saba",
"County, Eldorado",
"Scurry County, Snyder",
"Shackelford County, Albany",
"Shelby County, Center",
"Sherman County, Stratford",
"Smith County, Tyler",
"Somervell County, Glen Rose",
"Starr County, Rio Grande City",
"Stephens County, Breckenridge",
"Sterling County, Sterling City",
"Stonewall County, Aspermont",
"County, Sonora",
"Swisher County, Tulia",
"Tarrant County, Fort Worth",
"Taylor County, Abilene",
"Terrell County, Sanderson",
"Terry County, Brownfield",
"Throckmorton County, Throckmorton",
"Titus County, Mount Pleasant",
"Tom Green County, San Angelo",
"Travis County, Austin",
"Trinity County, Groveton",
"Tyler County, Woodville",
"Upshur County, Gilmer",
"Upton County, Rankin",
"Uvalde County, Uvalde",
"Val Verde County, Del Rio",
"Van Zandt County, Canton",
"Victoria County, Victoria",
"Walker County, Huntsville",
"Waller County, Hempstead",
"Ward County, Monahans",
"Washington County, Brenham",
"Webb County, Laredo",
"Wharton County, Wharton",
"Wheeler County, Wheeler",
"Wichita County, Wichita Falls",
"Wilbarger County, Vernon",
"Willacy County, Raymondville",
"Williamson County, Georgetown",
"Wilson County, Floresville",
"Winkler County, Kermit",
"Wise County, Decatur",
"Wood County, Quitman",
"Yoakum County, Plains",
"Young County, Graham",
"Zapata County, Zapata",
"Zavala County, Crystal City"
];
jQuery( "#county" ).autocomplete({
source: availableTags,
appendTo: '#acmenu',
minLength: 3,
select: function( event, ui) {
county=ui.item.label;
if (county === "El Paso County, El Paso" || county === "Hudspeth County, Sierra Blanca" || county === "Culberson County, Van Horn") {
jQuery(".hide-me select").val("AAMILGI@lawtigers.com");
} else {
jQuery(".hide-me select").val("TXGI@lawtigers.com");
} //close else
} //close function
});
}));
</script>
<div class="county" style="display:none">
<div class="ui-widget">
<!--<label for="county">County: </label>-->
[text* county id:county placeholder "County" "County"]
</div>
</div>
<div id="acmenu" style="color: #000000; background-color: #ffffff; border-radius:5px" ></div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<p>[submit "Submit Now"]</p>
</div>
</div>
<div class="hide-me" style="display:none">
[select to-email "AAMILGI@lawtigers.com" "AZGI@lawtigers.com" "CAGI@lawtigers.com" "COGI@lawtigers.com" "ILGI@lawtigers.com" "NEGI@lawtigers.com" "INGI@lawtigers.com" "SCGI@lawtigers.com" "UTGI@lawtigers.com" "WYGI@lawtigers.com" "TXGI@lawtigers.com" "NMGI@lawtigers.com"]
</div>
<script type="text/javascript">
jQuery(document).ready(jQuery(function () {
jQuery("p.state select").change(function() {
var val = jQuery(this).val();
if(val === "TX") {
jQuery(".county").show();
c = document.getElementById("county");
c.value = "";
c.className = "wpcf7-form-control wpcf7-text wpcf7-validates-as-required";
c.setAttribute("aria-required", "true");
c.setAttribute("aria-invalid", "true");
}
else {
jQuery(".county").hide();
c = document.getElementById("county");
c.value = "county";
}
});
}));
</script>
<script type="text/javascript">
jQuery(document).ready(jQuery(function () {
jQuery("p.state select").change(function() {
jQuery(".hide-me select").val("AAMILGI@lawtigers.com");
var val = jQuery(this).val();
var county = jQuery(".county input").val();
if(val === "AZ") {
jQuery(".hide-me select").val("AZGI@lawtigers.com");
}
if(val === "CA") {
jQuery(".hide-me select").val("CAGI@lawtigers.com");
}
if(val === "CO") {
jQuery(".hide-me select").val("COGI@lawtigers.com");
}
if(val === "IL") {
jQuery(".hide-me select").val("ILGI@lawtigers.com");
}
if(val === "NE") {
jQuery(".hide-me select").val("NEGI@lawtigers.com");
}
if(val === "IN") {
jQuery(".hide-me select").val("INGI@lawtigers.com");
}
if(val === "SC") {
jQuery(".hide-me select").val("SCGI@lawtigers.com");
}
if(val === "UT") {
jQuery(".hide-me select").val("UTGI@lawtigers.com");
}
if(val === "WY") {
jQuery(".hide-me select").val("WYGI@lawtigers.com");
}
if(val === "NM") {
jQuery(".hide-me select").val("NMGI@lawtigers.com");
}
});
}));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment