Can’t get my fieldtype working with Low Variables.
Hi Low,
I’m having some trouble making my fieldtype compatible with Low Variables. I’m returning true in the accepts_content_type method for the low_variables content type but it’s not showing up. Additionally, I echoed in the method and it does not appear that the method is getting run. Any ideas what I might be doing wrong?
Replies
Low 25 Nov 2015 00:22
Have you defined a var_display_field method as per the note here?
TJ Draper 25 Nov 2015 00:28
Yep, tried that. I should note that this is an add-on with more than one fieldtype. Maybe related?
TJ Draper 25 Nov 2015 00:29
Update on the multiple fieldtypes in the add-on package, doesn’t seem to be the issue. I tried in another fieldtype that is only one field type and it’s not showing up either.
Low 25 Nov 2015 07:37
Is it listed in the Settings page? (And are we're talking EE2 or EE3 here?)
TJ Draper 25 Nov 2015 12:42
It is not. It has to be checked on the settings page to show up as an available fieldtype, right? In any event, I’ve checked in the settings and in creating a field.
Low 25 Nov 2015 13:06
What are your PHP, EE and LV versions?
TJ Draper 25 Nov 2015 13:08
EE 2.10.1
LV 2.6.1
PHP 5.6.15
Low 25 Nov 2015 13:10
Ah, there we go.
The docs apply to the v3 version of LV. I'll add a gist somewhere with the old docs.
TJ Draper 25 Nov 2015 13:11
Ah ha! Sounds good. Let me know when it’s up. Thanks!
Low 25 Nov 2015 13:24
Here you go: https://gist.github.com/low/23445ac59...
Note that the accepts_content_type method is only supported in v3.