Input form suddenly not populating from Javascript

  • 17 September 2018
  • 0 replies
  • 2 views

(I am a non-Javascript site maintainer)
After years of working fine, our landing page is not populating values to input fields (from a simple data table).
This is the site
http://wbo.istobiologics.com/sub-page-1-bill-only/?part_id=AMS300&lot_number=&quick_code=LF100033

This is the code that is supposed to populate the form. The code prior to this just builds a table and works fine.

// INSERT CODE ABOVE THIS LINE
// Get our data from the table
var form = data[('input#quick_code').val()]; // Only fill in the form if the row exists if (form !== undefined){ (‘input#po_number’).val(form.po_number);
// ('input#po_number').val("PO12345"); (‘input#price’).val(form.price);
('input#quantity').val(form.quantity); (‘input#inventory_source’).val(form.inv);
('input#physician_name').val(form.physician_name); (‘input#case_location_name’).val(form.co);
('input#street_addr').val(form.addr); (‘input#city’).val(form.city);
('input#state').val(form.state); (‘input#zip_code’).val(form.zip);
('input#distributor_name').val(form.dist); (‘input#your_name’).val(form.name);
$(‘input#your_email’).val(form.email);

}
else {
  	$('input#quick_code').val('NO INFO')
}

$('input#quantity').focus();

});


0 replies

Be the first to reply!

Reply