0

I'm trying to implement Chosen as a front to a Playa-field in my Zoo Visitor channel. Entering data isn't a problem, but obviously I want to have the currently selected entry selected as default. This wasn't behaving as expected, so I stripped everything down to the following bit of code:

{exp:zoo_visitor:update_form
    return='profiel'
    class='custom profile'
    allowed_groups='7'
}
    {member_employer var_prefix="employer"}{employer:entry_id}{/member_employer}
{/exp:zoo_visitor:update_form}

When I load this template, it outputs 810, which isn't even an actual entry. When I output the value in another template between {exp:zoo_visitor:details} tags it outputs the expected entry_id of 243. I've tried removing the var_prefix (which was only added later for debugging to be safe anyway). Any idea what's going on here?

1

The update form works just the same as a Channel Form. You are trying to use tag syntax that works inside a channel entries tag, but that won't work inside a form. Either use {field:your_playa_fieldname} or if you really want to fetch them separately, you will have to resort to using a channel entries tag inside an embed. Also have a look at this thread http://devot-ee.com/add-ons/support/zoo-visitor/viewthread/10501#37493

Cheers, Nico

3
  • That's what I thought, shame though because it works for most "normal" fields. How would I go about getting the current entry_id into that embed? From what I can gather now this would require me to write 2 embeds: one for getting the current value and then pass the entry_id on to another embed for outputting the options. – Steven Oct 9 '13 at 9:26
  • the entry_id variable is directly available in the update form, so just pass that into the embed – Nico De Gols Oct 9 '13 at 10:24
  • Wait, but this entire question is about the entry_id not outputting correctly... – Steven Oct 9 '13 at 20:02

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.