joomla/joomla-cms — pull request #3588 by Bakual (2014-05-12 14:19:21+00:00)
Title: Cleaning up datalist for JFormfieldText

### Issue
There is a phpcs issue with the signature of `JHtmlSelect::suggestionlist()`. It contains a required `$idtag` after the optional `$optkey` and `$optText`, which essentially makes those two required as well.

Fixing this correct is basically not possible without creating a new function and proxy it.

The produced datalist also has some errors in it.

### Solution
* This PR will deprecate `JHtmlSelect::suggestionlist()` which was introduced with J3.2 to implement the `` tag into the text formfield.
* The datalist will be created directly in the `getInput()` function of the formfield instead. It's a very simple code and the current usage of `JHtmlSelect::options()` within `JHtmlSelect::suggestionlist()` to generate the items created more problems and was basically overkill.
* Deprecated `getSuggestions()` in the text formfield and replaced it with `getOptions()` like we use in every other formfield. `getSuggestions()` is proxied to `getOptions()` in case someone was extending the class and actually used it.

### Testing
Add some options to a text field and see if the datalist works. For example change the title for the article form to
````

Option1

Option2

````
It should show a list with "suggestions" as soon as you start typing or click into the field.
Please note that the first option will not show because there is no value given. The second option will show with both the value and the text, depending on browser (Chrome shows the text rigth aligned a bit smaller). The third option will show the value only.

#### Remarks
This is based on a Codestyle PR and some discussions we had after it.
Unfortunately I forgot to do the PR then and now can't find the discussion anymore.

#### Tracker
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33430

#### Note
Same as https://github.com/joomla/joomla-cms/pull/3246 but against staging and rebased.