/**
     * 
     * Generate a select form using as options values from a db table.
     * 
     * $sdata values:
     * name: Name of select form used also if "ref_value" is empty
     * default: Selector default (selected) value.
     * order: Data base order field, used to order selector field.
     *        By defaulr "ord" if empty. If "use_custom_order" is given as value
     *        the order or selector field will be done by "order_by" value.
     * class: CSS Selector class, empty by default. 
     *        Bootstrap default is: "form-control input-sm"
     * style: Aditional CSS style to the selector.
     * ref_field: Data base field to cross value with "ref_value", used to get 
     *            selector values from a table with many selectors data.
     *            The default value can by set in framework conf as class "def" and 
     *            key "selectors_ref_field". If all is empty, default is "ref".
     *            If value is "use_custom_where", a SQL where clause can
     *            be supplied in "ref_where".
     * ref_value: Value to suppy to "ref_field", same as name if empty.
     *            This value must match with the reference value to get actual
     *            selector list of options from selector's data base table.
     * ref_where: If selector list of values must be obtained with a complex
     *            where caluse, it can be stated here, adding "use_custom_where"
     *            as "ref_field" value in configuration array.
     * no_where: Select all fields of a database if true (no where sentence)
     * order_by: If "use_custom_order" is supplied as value in "order" option
     *           you can supply a custom SQL order statement here.
     * empty_ini: If "true", an empty option will be added as first selector 
     *            value. Any text supplied but true will be used insted the 
     *            blank character.
     * empty_value: If "empty_ini" is created, a value can be supplied here.
     * name_array: If selector name is supplied by an array, this field must be
     *             the name of this array and value must match "name" parameter.
     *             I.E. if form name is "myform" and it is suplied as:
     *             myarray['myform'], the value to this option must be "myarray"
     *             and "name" option value must be "myname".
     * disable_err: True to return empty text on errors.
     *
     * only_name: If a value number is suplied, return only the name of given 
     *            value, instead a selector.
     * field_name: Valid with "only_name" switch. This is the name of field 
     *              that contains the data.
     * value_name: Valid with "only_name" switch. This is the name of data 
     *              to cross with $this->opt->field_name.
     * get_text_value: Get the text value from framework text using name as keyword
     * 
     * onchange: If true add the event onchange="this.form.submit()", if any 
     *           other data is supplied, use it as parameter of onchange event.
     * multiple: Generate a multiselect selector. If array name supplied, the 
     *           selector name will be name[] to allow multiple values.
     * id_ref: Generate a selector id with given value.
     * select2: Generate javascript for select2 if true
     * placeholder: Placeholder for the selector if using select2
     * disabled: Create the selector disabled.
     * selector_empty: Alternative "selector empty error" text
     * putSelectResultsSet: object with select data
     * title: Select title
     * tooltip: true to add data-toggle, bootstrap CSS & JS must be loaded
     * placement: data-placement used in data-toggle, default top
     *             
     * $dbdata: Database table to get options for selectors. Must be supplied in
     *          JSON format or as array. If empty, value will be loaded from 
     *          framework conf category "def" key "selectors_data" as JSON, I.E.:
     *          ["selectors","value","name"]. If not value given and no 
     *          defaul found in conf, the maethod will return with error.
     *          Array must contain in this order: 
     *          "table name","field value","field name"
     * 
     * @param array|string $sdata array or json with selector data:
       [name,default,order,class,style,ref_field,ref_value,ref_where,no_where,
        order_by,empty_ini,empty_value,name_array,disable_err,only_name,
        field_name,value_name,get_text_value,onchange,multiple,id_ref,select2,
        placeholder,disabled,selector_empty,putSelectResultsSet]
     * @param array|string $dbdata array or json with db data
     * @return string|boolean Select form | false if empty db data
     * 
     * default text keys: [name_must_be_supplied,selectors_data,
     * json_dbdata_incorrect,table_not_found,value_field_not_found,
     * name_field_not_found,selectors_ref_field,selectors_order_field,
     * selector_empty]
     * 
     */