-1
I need to make the value collected in the option, complete the action of my form. It would be something similar to this idea, but is not returning the desired.
<form class="form-horizontal" id="pform" action="/registrar/{valor}" method="post" enctype="multipart/form-data" name="post">
<div class="modal-header">
<h5 class="modal-title">Registros</h5>
</div>
<div class="modal-body">
<input type="hidden" id="id" class="form-control">
<div class="form-group">
<label for="user_id" class="control-label">Tipo de registro</label>
<div class="input-group">
<select class="form-control" id="tipo_id" onchange="option(this.value)">
<option value="1">Entrada</option>
<option value="2">Saida</option>
<option value="3">Retirada</option>
<option value="4">Despesas Fixas Mensais</option>
<option value="5">Despesas Fixas Anuais</option>
</select>
</div>
</div>
<div class="form-group">
<label for="nomeEntrada" class="control-label">Descrição</label>
<div class="input-group">
<input type="text" class="form-control" id="nomeEntrada" placeholder="Nome da entrada">
</div>
</div>
<div class="form-group">
<label for="valorEntrada" class="control-label">Valor</label>
<div class="input-group">
<input type="number" class="form-control" id="valorEntrada" placeholder="Valor da entrada">
</div>
</div>
<div class="form-group">
<label for="user_id" class="control-label">Usuário</label>
<div class="input-group">
<select class="form-control" id="user_id" >
<option value="{{ Auth::user()->id }}">{{__(Auth::user()->name)}}</option>
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Salvar</button>
<button type="cancel" class="btn btn-secondary" data-dismiss="modal">Cancelar</button>
</div>
</form> </p>
</div>
</div>
</div>
<script>
function option(valor){
console.log(valor);
}
</script>