Type of dish: Main course
Number of persons: 4
Preparation time: 45 minutes
Be a member: Want to know the ingredients ? Create an account and see it for free

HI TIM I AM MAKING A BOLD TEST LIVE

That's a little sentence just to show

some blabla

I hate it ;)

and more and more

until the end

Accessing the parameters/options of Custom Fields

Thanks to Tom van der Laan for the tip! Detailed explanation on

https://gist.github.com/TLWebdesign/1764e3b8734ddf54f7f5acc66aca40c2

Example for a custom field of type "list" (type of dish in this demo site)

$this->item->jcfields[2]->fieldparams

object(Joomla\Registry\Registry)#1538 (3) {
  ["data":protected]=>
  object(stdClass)#1562 (2) {
    ["multiple"]=>
    string(0) ""
    ["options"]=>
    object(stdClass)#1564 (3) {
      ["options0"]=>
      object(stdClass)#1563 (2) {
        ["name"]=>
        string(12) "First course"
        ["value"]=>
        string(5) "first"
      }
      ["options1"]=>
      object(stdClass)#1565 (2) {
        ["name"]=>
        string(11) "Main course"
        ["value"]=>
        string(4) "main"
      }
      ["options2"]=>
      object(stdClass)#1566 (2) {
        ["name"]=>
        string(7) "Dessert"
        ["value"]=>
        string(7) "dessert"
      }
    }
  }
  ["initialized":protected]=>
  bool(true)
  ["separator"]=>
  string(1) "."
}

$this->item->jcfields[2]->fieldparams->get('options');

object(stdClass)#1564 (3) {
  ["options0"]=>
  object(stdClass)#1563 (2) {
    ["name"]=>
    string(12) "First course"
    ["value"]=>
    string(5) "first"
  }
  ["options1"]=>
  object(stdClass)#1565 (2) {
    ["name"]=>
    string(11) "Main course"
    ["value"]=>
    string(4) "main"
  }
  ["options2"]=>
  object(stdClass)#1566 (2) {
    ["name"]=>
    string(7) "Dessert"
    ["value"]=>
    string(7) "dessert"
  }
}

$this->item->jcfields[2]->params;

object(Joomla\Registry\Registry)#1561 (3) {
  ["data":protected]=>
  object(stdClass)#1568 (27) {
    ["class"]=>
    string(0) ""
    ["label_class"]=>
    string(0) ""
    ["show_on"]=>
    string(0) ""
    ["render_class"]=>
    string(4) "well"
    ["showlabel"]=>
    string(1) "1"
    ["label_render_class"]=>
    string(0) ""
    ["display"]=>
    string(1) "2"
    ["layout"]=>
    string(0) ""
    ["display_readonly"]=>
    string(1) "2"
    ["assignmentMatchingMethod"]=>
    string(3) "and"
    ["assign_menu"]=>
    string(1) "0"
    ["assign_menu_param_noitem"]=>
    string(1) "0"
    ["assign_menu_param_inc_children"]=>
    int(0)
    ["assign_urls"]=>
    string(1) "0"
    ["assign_urls_list"]=>
    string(0) ""
    ["assign_urls_param_regex"]=>
    string(1) "0"
    ["assign_contentview"]=>
    string(1) "0"
    ["assign_datetime"]=>
    string(1) "0"
    ["assign_datetime_param_publish_up"]=>
    string(0) ""
    ["assign_datetime_param_publish_down"]=>
    string(0) ""
    ["assign_usergroups"]=>
    string(1) "0"
    ["assign_devices"]=>
    string(1) "0"
    ["assign_referrer"]=>
    string(1) "0"
    ["assign_referrer_list"]=>
    string(0) ""
    ["assign_lang"]=>
    string(1) "0"
    ["assign_php"]=>
    string(1) "0"
    ["assign_php_list"]=>
    string(0) ""
  }
  ["initialized":protected]=>
  bool(true)
  ["separator"]=>
  string(1) "."
}

$this->item->jcfields[2]->params->get('render_class');

string(4) "well"
More information: https://www.marmiton.org/recettes/recette_pate-a-pizza-fine_29544.aspx