---
name: "Embperl::Form::DataSource"
section: "3pm"
platform: "linux"
package: "libembperl-perl"
version: "2.5.0-17"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/Embperl::Form::DataSource"
---

# Embperl::Form::DataSource(3pm)

Base class for data source objects which provides the data for ControlMutlValue objects.

## NAME

Embperl::Form::DataSource - Base class for data source objects which provides the data for ControlMutlValue objects.

## SYNOPSIS

Do not use directly, instead derive a class

## DESCRIPTION

This class is not used directly, it is used as a base class for all data source objects. It provides a set of methods that could be overwritten to customize the behaviour of your controls.

## METHODS

### get\_values

returns the values and options. Must be overwritten.

*get\_id\_from\_value*

returns an id for a given value. This allows one to have an id form a value/option pair which is not exactly the same as the value. This is used in json requests for example for selectdyn control.

*get\_datasource\_controls*

returns additional controls provided by the datasource object e.g. a browse button

## AUTHOR

G. Richter (richter at embperl dot org)

## SEE ALSO

[**perl**(1)](/perl/1.md), Embperl, Embperl::Form, Embperl::From::ControlMultValue
