Jump to content

Recommended Posts

Posted

How to get all possible options from the select field in current language? This code always returns me options in default language:

$field = $fields->get('encyclopedia_item_type');
$options = $field->type->getOptions($field);

foreach($options as $option) {
echo "<option>$option->title</option>";
}

I can filter them by language through  PHP and use $option->title1020 instead of $option->title 

foreach($options as $option) {
echo "<option>$option->title1020</option>";
}

But i believe there is a better way

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...