Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

EugenMayer/views_select

Repository files navigation

Purpose

Ever wondered how to utilize views easily in e.g. a dialog to let the use select a row out of a complex view with filters and all that?
Well think about just using a table style which lets you set a Javascript callback and let you select a column of the fields as the value.

When the user clicks a row, your callback gets called and the first parameter will be the value, the second the row itself (for whatever you want to do with it).
Thats it!

Installation

  1. Activate the module
  2. Clear the cache. thats it!

Usage

  1. Create a view.
  2. Select “Table select” as style plugin
  3. Go to the options form and set the usual table things like order etc. and
    1. Set the callback. This javascript method will be called, if a row gets selected
    2. select a column out of the current fields, which will be passed as value

Your done, thats it :)