Ok so i have this problem i am trying to address. I have this textfield with the id of request_money
<input id="request_money" name="request[money]" size="30" type="text">
In this textfield i have a watermark plugin that i am using with the text "Not now" which is happening via jQuery
$("#request_money").Watermark("Not Now");
This works fine but the problem arrises when i submit the form and this field is only supposed to be a numeric field, but when i submit it blank it takes the text "Not now" and sends it in. I tried a few ways to handle this...First i tried with jQuery like this...
$('form').submit(function(){
if($("#request_money").val("Not now")){
$("#request_money").val("")
}
});
but for some reason it even clears out all the numeric values also...seems to always be true, not sure why
and second i tried in the rails model
using the errors
def validate
if money == "Not now"
money = ''
end
And rails did not like that...any suggestions