+ Start a Discussion

VForce Inputfields not writing blank entry

Dear all,


I am having a head scratching moment with VF. I have uploaded this same post a couple of times already but with no luck so far. Hoping someone can help this time around.


I have created a series of VF Pages. When using inputfields and entering data into a blank field all is fine. But when the field has data stored and you are trying to enter a blank entry the blank update does not write to the database. Just like it ignores the blank entry.


Can someone.. anyone help please? 

Suresh RaghuramSuresh Raghuram

can u explain in detail with your code


Hi, thanks for the reply.


This applies to all inputfields in VF tha tI have used. So lets just use a date inputfield for this example. So I enter a date  and press save and the update is written to the database with no issues. All working fine so far. I go back into the VF page and then using the same date field want to erase the date that I entered with no value (blank / null). I then press save. The record saves as it should but the update is not written to the database. If I go back into the VF page the date is still there.



Please see my previous post with code and pic.




Hope this explains better



And to add, if I enter another date to replace the originally entered date that works. It is just when entering a blank value.