JSFiddle - React, Tailwind, and code Playground

by Alex Pisklov

HTML

<form action="">
<select name="delivery" id="delivery" class="control">
            <option value="dost">Доставка</option>
            <option value="sam">Самовывоз</option>
</select>
<input type="text" name="name" placeholder="Имя">
<input type="text" name="phone" placeholder="Телефон">
<input type="text" name="address" placeholder="Адрес">
</form>

CSS

input{
  display: block;
  margin-bottom: 6px;
}

select{
  margin-bottom: 10px;
}

JavaScript

$('#delivery').change(function() {
  if($(this).val() === "sam")
   {
    $("input[name=address]").hide();
   }
   else
   {
   $("input[name=address]").show();
   }
 });