Skip to content

Instantly share code, notes, and snippets.

@saltlakeryan
Last active February 11, 2016 19:27
Show Gist options
  • Save saltlakeryan/6a39487fe5cc55d4d600 to your computer and use it in GitHub Desktop.
Save saltlakeryan/6a39487fe5cc55d4d600 to your computer and use it in GitHub Desktop.
;(function prefill_offcampus() {
$('.phone').val('801-123-1234');
$('input[name="company"]').val('Walmart');
$('input[name="billing_address"]').val('1252 Main St.');
$('input[name="billing_city"]').val('Salt Lake City');
$('select[name="billing_state"]').val('UT');
$('input[name="billing_zip"]').val('84105');
if (!$('input[name="cleanroom"]').is(':checked')) {$('input[name="cleanroom"]').click();}
})();
//or on one line:
;(function prefill_offcampus() {$('.phone').val('801-123-1234');$('input[name="company"]').val('Walmart');$('input[name="billing_address"]').val('1252 Main St.');$('input[name="billing_city"]').val('Salt Lake City');$('select[name="billing_state"]').val('UT');$('input[name="billing_zip"]').val('84105');if (!$('input[name="cleanroom"]').is(':checked')) {$('input[name="cleanroom"]').click();}})();
//email phone ucard_num unid ucard_rfid_num pi_first pi_last pi_email department chartfield cleanroom
;(function prefill_oncampus() {
$('.phone').val('801-123-1234');
$('input[name="unid"]').val('u0279192');
$('input[name="ucard_num"]').val('9840123412349876');
$('input[name="ucard_rfid_num"]').val('123456');
$('input[name="pi_first"]').val('Ryan');
$('input[name="pi_last"]').val('Taylor');
$('input[name="pi_email"]').val('[email protected]');
$('input[name="department"]').val('nanofab');
$('input[name="chartfield"]').val('12345-54321');
if (!$('input[name="cleanroom"]').is(':checked')) {$('input[name="cleanroom"]').click();}
})();
//or on one line:
;(function prefill_oncampus() {$('.phone').val('801-123-1234');$('input[name="unid"]').val('u0279192');$('input[name="ucard_num"]').val('9840123412349876');$('input[name="ucard_rfid_num"]').val('123456');$('input[name="pi_first"]').val('Ryan');$('input[name="pi_last"]').val('Taylor');$('input[name="pi_email"]').val('[email protected]');$('input[name="department"]').val('nanofab');$('input[name="chartfield"]').val('12345-54321');if (!$('input[name="cleanroom"]').is(':checked')) {$('input[name="cleanroom"]').click();}})();
///NEXT ONE
;(function prefill_login() {
document.getElementsByName('fname')[0].value='John';
document.getElementsByName('lname')[0].value='Doe';
document.getElementsByName('email')[0].value='[email protected]';
document.getElementsByName('password')[0].value='1234567';
$(document.getElementsByName('type')[0]).click();
})();
;(function prefill_login() {document.getElementsByName('fname')[0].value='John';document.getElementsByName('lname')[0].value='Doe';document.getElementsByName('email')[0].value='[email protected]';document.getElementsByName('password')[0].value='1234567';$(document.getElementsByName('type')[0]).click();})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment