JQuery - If statement for Eform

JQuery - If statement for Eform

i am trying to populate a text box based on the outcome of a dropdown.

i am trying to populate a text box based on the outcome of a dropdown.

currently if i use:

$(document).ready(function () {
  //if Department is changed
  $("#Field9").on('change',function(){
    $("#Field27").val(3);
});

i get "3" in the correct field so that's fine i know the field references are correct.

my scenario is i want to customise "Field27" based on the options in the dropdown ("Field9".

my existing code is:

$(document).ready(function () {
  //if Department is changed
  $("#Field9").on('change',function(){

//check is equal to planning if($("#Field9").val() == "Planning"){ $("#Field27").val(3); } else{ $("#Field27").val(4); }

}

}); });

can anyone advise why the if statement is not working as desired? it's not even populating 4 in the "else" statement


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Multiple form submit upon last form PHP

I am working on a web application using PHP and sql on localhost using wamp server.

Ajax Form Submit examples using jQuery

In this jquery ajax form tutorial – you have learned how to send or submit the form data or multipart form using the jquery ajax on the server. Also, you have known the related queries of jquery ajax form.

jQuery ajax get request method example

### jQuery Ajax Get Request Method Example This article is originally published at [https://www.tutsmake.com/jquery-api-ajax-get-method-example/](https://www.tutsmake.com/jquery-api-ajax-get-method-example/...