having a bit of a problem with a field type and trying to pass in tag data.:

in my template i have

{entries ...} {field} {keys}{key}{/keys}{/field} {/entries}

however when i do a var_dump($tag_data) in the replace_tag() function i am getting false.

however a var_dump($data) if producing the expected data in the same function..

Any Ideas?

Additional: i have already tried a tag pair in the same format as {myfield:option} Tag data here {/myfield}


You have to add the has_array_data property to your fieldtype class:

class My_field extends EE_Fieldtype {
  public $has_array_data = TRUE;

  • hi thanks for the reply - could you eleborate on how to do that - this is my first time creating a field type and the docs are lacking.. – 4razmus Nov 18 '13 at 17:19
  • Updated the example. It's really that simple. – Rob Sanchez Nov 18 '13 at 17:31
  • most excellent - kinda makes a mockery of my wasted time though hehe – 4razmus Nov 18 '13 at 18:37

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.