Progressive Search Field Renderer
If you love progressive search but find it just a little bit too much work to write the custom script for it, do I have a field renderer for you!
Progressive Search is Fakoli's implementation of an input field that displays below it in a scroll box search results box that match the input string.
Now when you need to turn a string field on an AutoForm into a progressive search field, you can do the following:
At the top of your page, include the component "field_renderers" where the class ProgressiveSearchFieldRenderer lives.
Fakoli::using("field_renderers");
Override your form object's string field or add a new field to the form to render the progressive search:
$lessonSelect = new ProgressiveSearchFieldRenderer($form, "portfolio_lesson", "Unit, UDL Solution, or PathFinder Used", "/action/student_work/lesson_search_handler");
You need to pass into the field renderer the form, field name, label, and the action handler that will retrieve the results and display them in the progressive search scroll box.
You can modify the progressive search options using the field renderer's variables:
var $minimumLength = 4;
var $cssClass = "scrollbox";
var $scrollBoxWidth = "300px";
Enjoy!
Taxonomies, Panels and Component Help (oh my!) »
« Be the Monarch of all you Survey