I have a question on Craft's Active Record,
protected function defineAttributes(){
'customer_ref' => array(
AttributeType::String,
'required' => true
),
'fault_code' => array(
AttributeType::String,
'required' => true
),
'supplier_agent' => array(
AttributeType::String,
'required' => true
),
'response_delay' => array(
AttributeType::String,
'required' => true
)
}
I have my defined attributes method, when I set required = true
, and the field is empty the record fails to save!
When I set it as required = false (or just not add the required part) , the record will save but none of the field values get inserted to the database, I have a blank row.
So what do i do, I just want it to insert the row, if there is something missing let it be missing!
Any ideas?
Thanks,