liveselect package proposal

From: Date: Thu, 28 Aug 2014 14:08:18 +0000
Subject: liveselect package proposal
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-55407@lists.php.net to get a copy of this message
Hi all, I have rewritten from scratch HTML_QuickForm_Livesearch and I would like to create a new package. I prefer create a new package instead of update it because: 1. the interface is not compatible with the previous one 2. the control can be see as an extend of html select, when elements list is to huge to be sent to the client. So the name have to remember the html select and that the search is done on the server (live) so HTML_QuickForm_Liveselect is more appropriate. This is a very little description of the package: Class to dynamically create an HTML input text element that, when focused, is polled at regulary interval; if the text is changed XMLHttpRequest is called sending the request to the server. The request is an array in which are admitted only the following key: - 'q' is the input the user has typed in the query field. - 'h' is the hidden value and the result contain only the row for this
      primary key. If 'h' exists 'q' is ignored.
- 'p' is an array of parent values (see parentsList option). The server returns an array for all the results found. The array can contains the following keys: - 'q' the query string that generated this result. - 'e' an error message in case of error occurred. - 'rows' an array containing the rows returned. Every row can have
      the following keys:
      - 'h' the value to put in the hidden field
      - 'q' the value to put in the query field
      - 't' the value to put in the title
      - 'limit' the limit must be only in the first or in the last
          row returned and contains information to the next
          and previous results page.
The result is shown as a live dropdown select.

« previous php.pear.dev (#55407) next »