Hide text input when country is Spain
This commit is contained in:
parent
997de5c4bf
commit
79cc26b7e5
@ -17,7 +17,7 @@ This project consists of an Information System for a Medical Institution.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Install Nix (compatible with Nix and Linux):
|
||||
1. Install Nix (compatible with MacOS and Linux):
|
||||
|
||||
``` {.shell}
|
||||
curl -L https://nixos.org/nix/install | sh
|
||||
|
@ -2,16 +2,18 @@ function changeInputType() {
|
||||
country = document.getElementById("pais").value;
|
||||
region = document.getElementById("provincia");
|
||||
city = document.getElementById("localidad");
|
||||
region_input = document.getElementById("provincia2");
|
||||
city_input = document.getElementById("localidad2");
|
||||
|
||||
if (country == 73) {
|
||||
region.hidden = false;
|
||||
city.hidden = false;
|
||||
region_input.type = "hidden";
|
||||
city_input.type = "hidden";
|
||||
} else {
|
||||
region.hidden = true;
|
||||
city.hidden = true;
|
||||
region_input = document.getElementById("provincia2");
|
||||
city_input = document.getElementById("localidad2");
|
||||
region_input.type = "text";
|
||||
city_input.type = "text";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user