I have tried in several ways to disable the submit button of a form that is inside a modal bootstrap window, but I did not succeed. I already researched the documentation but tb I did not find it. Can someone give me a light?
Here are some of the ways I tried to do it:
$('#cxEditaEvento').find('button').prop('disable',true);
$('#cxEditaEvento button:contains('Salvar')').prop('disable',true);
The modal box I use is set like this (I put only a few pro code fields that do not get too long):
<div class="modal fade" id="cxEditaEvento" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title text-left" id="myModalLabel">Dados do Evento</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="formEditaEvento" id="formEditaEvento" name="formEditaEvento" method="POST" action="saveEvento.php">
<fieldset>
<div class="form-group">
<label class="col-sm-3 control-label" for="showID">ID</label>
<div class="col-sm-6">
<input class="form-control" type="text" name="showID" id="showID" disabled />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="complemento">Descrição</label>
<div class="col-sm-6">
<input class="form-control" type="text" name="complemento" id="complemento" placeholder="Complemento sobre o evento" value="" />
</div>
</div>
<div class="form-actions">
<button type="submit" name="enviar" value="enviar" class="btn btn-primary btn-large pull-left">Salvar</button>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</div>