Dave Rolsky




Given a foreign key and an optional row, this component produces a select form element for that relationship.

If a row is given, then its value will be used as the default value for the form element.


  • fk (required)

    An Alzabo::ForeignKey object representing the relationship.

  • row (optional)

    An Alzabo row object.

  • class (optional)

    This defaults to $m->base_comp->attr_if_exists('fk_to_one_select_class_default').

  • foreign_rows (optional)

    This allows you to pre-select the rows in the foreign table that will be used for the select options. Otherwise, the component simple grabs all the available rows from the foreign table.

  • display_column (optional)

    This is the column in the foreign table which should be used as the visible value of each option. This defaults to the column involved in the foreign key relationship.