so im new on javascript. I want to create form there is two field, phone number and country. And i want to seperate them on my database. I wonder how can i get country value from intl-tel-input ( https://github.com/jackocnr/intl-tel-input ). for example HTML
<form>
<label>Phone Number</label>
<!-- using intl-tel-input -->
<input type="tel" name="phone">
<label>Country</label>
<!-- how can i get country value automatically here from phone number field? -->
<input type="text" name="country">
</form>
Anyone can help me figure this out? thanks in advance.