Good morning!
I checked the link, Form inside Form , but That's not what I'm looking for.
I need to know if a form inside the other with two buttons and two different actions works.
Example:
<form type="post" action="dados_cadastrais.php">
<form type="post" action="negocicao.php">
<input type="text" value="nome" />
<input type="submit" value="Enviar">
</form>
<input type="text" value="Parcela">
<input type="submit" value="Salvar">
</form>
Actual project code:
<form method="post" action="<?= base_url()?>admin/credores/adicionar" id="form_credor_adicionar">
<div class="modal-body" style="padding-bottom: 0px;"> <!--padding 0px -->
<div class="row">
<div class="form-group col-sm-4">
<label for="cnpj">CNPJ</label>
<input type="text" id="cnpj" name="cnpj" class="form-control" autocomplete="off" placeholder="000.000.000-00" value="<?php echo set_value('cnpj'); ?>" >
</div>
<div class="form-group col-sm-6">
<label for="nome">Nome</label>
<input type="text" id="nome" name="nome" class="firstname form-control" autocomplete="off" onkeyup="maiuscula('.firstname')" placeholder="Informe o nome do devedor" value="<?php echo set_value('nome'); ?>" >
</div>
<div class="form-group col-sm-2">
<label for="genero" class="control-label">Ativo</label>
<select id="genero" name="genero" class="form-control">
<option value="" selected="selected">Selecione</option>
<option value="1">Sim</option>
<option value="0">Não</option>
</select>
</div>
<div class="form-group col-sm-12" style="margin-bottom: 0px;"> <!--margem 0px -->
<div class="card card-border nav-tabs-custom">
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#dados_cadastrais" data-toggle="tab" aria-expanded="true"><i class="fa fa-user" style="color: #A4BE40"></i> Dados Cadastrais</a></li>
<li class=""><a href="#tabela_negociacao" data-toggle="tab" aria-expanded="false" ><i class="fa fa-map-marker" style="color: #E9573F"></i> Tabela de Negociação</a></li>
</ul>
<div class="tab-content" style="">
<?php include 'include/tab_adicionar_dados_cadastrais.php';?>
<?php include 'include/tab_adicionar_tabela_negociacao.php';?>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer clearfix">
<button type="submit" class="btn btn-primary btn-flat pull-left"><i class="fa fa-save"></i> Salvar</button>
<button type="button" class="btn btn-default btn-flat" onclick="limpar_campos(this.form)"><i class="fa fa-refresh"></i> Limpar</button>
<button type="button" class="btn btn-default btn-flat" data-dismiss="modal"><i class="fa fa-times"></i> Cancelar</button>
</div>
</form>