Closed leosmeira closed 10 years ago
Problem when delete field and use simple_form with validates html5 field.
The course continues with the attribute "required" after being deleted.
This makes it impossible to save, because the validation blocks form.
<div class="fields" style="display: none;"> <div class="input decimal required"><input type="number" style="width:100px" step="any" required="required" placeholder="Quantidade" name="produto[precos_attributes][1375210595009][quantidade]" id="produto_precos_attributes_1375210595009_quantidade" class="numeric decimal required"></div> <div class="input decimal required"><input type="number" style="width:100px" step="any" required="required" placeholder="Preço" name="produto[precos_attributes][1375210595009][preco]" id="produto_precos_attributes_1375210595009_preco" class="numeric decimal required"></div> <div class="remove_nested"> <input type="hidden" value="1" name="produto[precos_attributes][1375210595009][_destroy]" id="produto_precos_attributes_1375210595009__destroy"><a title="Remover este Item" data-association="precos" class="remove_nested_fields" href="javascript:void(0)"></a> </div> <br class="clearboth"> </div>
The following How To should help in your case.
Problem when delete field and use simple_form with validates html5 field.
The course continues with the attribute "required" after being deleted.
This makes it impossible to save, because the validation blocks form.