cheesegrits
Support Gopher
A common requirement in Fabrik apps is to create a form which acts as a search filter for a table.
Lets say you have a table of Widgets, which have a 'description' and a 'name' element. You want to set up a form which will search the table on those two elements.
Create a new group (widget_search).
Create two elements in that group which have the same names as the elements in Widgets you are searching on ('name' and 'description'). Usually the easiest way to do this is to copy the original element, edit it, change the name back to the original name (it will have called itself copy_of_foo), and change the group to your new search group.
Create a new form (Widget Search). Include the new widget_search group. Don't enable email receipts, do not record in database. Set the Jump Page to the URL of the Widget table page (if in doubt just copy and paste it from your browser). Link the the form to your desired menu.
And that's it. When the Widget Search form is submitted, it will jump to the Widget Table page, and filter the table according to the values on the Widget Search form.
NOTE - your Widget Table page should probably not have any search features (element filters, advanced search) enabled, as these will tend to override what you are sending it from the search form.
-- hugh
Lets say you have a table of Widgets, which have a 'description' and a 'name' element. You want to set up a form which will search the table on those two elements.
Create a new group (widget_search).
Create two elements in that group which have the same names as the elements in Widgets you are searching on ('name' and 'description'). Usually the easiest way to do this is to copy the original element, edit it, change the name back to the original name (it will have called itself copy_of_foo), and change the group to your new search group.
Create a new form (Widget Search). Include the new widget_search group. Don't enable email receipts, do not record in database. Set the Jump Page to the URL of the Widget table page (if in doubt just copy and paste it from your browser). Link the the form to your desired menu.
And that's it. When the Widget Search form is submitted, it will jump to the Widget Table page, and filter the table according to the values on the Widget Search form.
NOTE - your Widget Table page should probably not have any search features (element filters, advanced search) enabled, as these will tend to override what you are sending it from the search form.
-- hugh