I have created a Custom FieldType with AttributeType::Mixed The field actually saves the a Custom Model I created. I'm trying to retrieve all the entries that have my custom model as the field. I'm trying to do this:

$criteria = craft()->elements->getCriteria(ElementType::Entry);
// testOrPanel is the name of my custom fieldtype.
$criteria->testOrPanel = ModelHelper::packageAttributeValue($test);
$entry = $criteria->first();

I know for a fact that the entry exists and has that value. and I have logged the ModelHelper result and it is exactly what the field has on the db, but it is not working. it is resulting in blank.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.