I'm working with PHP+MySQL. In one page I have a form with aprox. 30 inputs.
After showing the form, at the end I execute some jQuery sentences styling the form.
Well, some rows in my SQL have data empty inputs, so I show empty inputs. I want to fill the form with "------" without writing that slashes into DB because makes SQL much bigger.
I'm trying "replaceWith", but i dont know if this implementation with "empty" is correct. This does not work, even without .is(:empty)
<script>
$('#form').find('input[type=text]').is(':empty').replaceWith(function()
{
return this.val('------');
});
</script>