I'm creating a series of CRUD apps over an existing database from another system. Not all data is complete and there are some referential integrity problems (not PHsPeed fault, obviously).
But, when I try to delete a record from an arbitrary table that has null values in some columns, I got a "Required fields" message. But I'm not trying to save, but to delete the record.
I don't know if this is by design or a bug. Can you comment about?
WORKAROUND:
To clean the data I'm setting some columns to Required=NO, but I don't want the user to introduce new data leaving required fields empty.
Best regards,
My first impression is a bug, as deleting a record does not require input of data. I assume that you use the standard toolbar. We have to check it out.
Well, we replicated the issue, but to do so, we needed to insert a record using a dbmanager tool, because you cannot enter a null value if the field is required. So if the field is required, but contains a null in the database, then this record is not entered through phspeed, or the field was not required in the first place. That doesn't mean that it is unexpected behavior and we will see if we can disable the parsley javascript library when the form is set into deletion mode. As a temporary fix, you can consider using the onrecord events to set some value to the null fields.
Thank you, you're right: we're dealing with inherited, incomplete data from other system, so fields that must have a value really has null in the database.
And thank you for the suggestion, the onrecord trick (set the missing values) is working: now I can set the field to required (so new data is validated) and delete old records without warning messages.
Regards,