Voting starts in March for the Drupal Association Board election.
Formfilter will become unsupported the day support for Drupal 6 is dropped.
Formfilter provides tools and a user interface for doing common form altering tasks. Includes a UI for selecting which fields to hide (passing the elements as values, if possible). Also includes an optional filtering of node forms to promote two fields and then put fieldsets in an 'advanced options' fieldset, to declutter the form.
FormFilter is unmaintained
The Future of Formfilter
Using Formfilter UI
Formfilter UI allows admin users with 'administer form filters' permission to hide - for each specific form - selected input fields from users who don't have the 'view forms without filtering' permission.
Admins will see, at the foot of every input form (for example the Node Edit tab), a 'Filter this form' link. Following this link brings up a version of the form with a Form Filter checkbox adjacent to each field (eg 'Hide /Title/: [x]'). Selecting a checkbox will hide that field from unauthorised users, while allowing all the unselected fields to be used normally.
Because users with 'view forms without filtering' permission see the unfiltered version of each form, there is also a link to 'Preview a filtered version of this form' that appears once some formfiltering has been applied.
Formfilter provides a method,
formfilter_filter_form(), that can be used by developers to produce a filtered version of a form, in which designated elements are passed as values rather than shown to users. By converting elements to values, we ensure their data are retained.
To use formfilter:
- Add formfilter as a dependency of your module.
- Use the
formfilter_filter_form() takes three arguments:
$formThe form to be altered.
$filtersAn array of elements to make invisible in the form, each element in turn being an array of form keys corresponding to the path of the element in the form structure. For example, to hide the element
$form['comment_filter']['format']from $form, you could call this function as follows:
formfilter_filter_form($form, array(array('comment_filter', 'format')));
$inverseIf TRUE, all elements except the ones given in $filters will become invisible. This defaults to FALSE. The following call would produce a form with only the
formfilter_filter_form($form, array(array('comment_filter', 'format')), TRUE);
- Maintenance status: Seeking new maintainer
- Development status: No further development
- Module categories: Administration
- Reported installs: 828 sites currently report using this module. View usage statistics.
- Downloads: 18,702
- Last modified: November 5, 2015
- This project is not covered by the security advisory policy.
It may have publicly disclosed vulnerabilities. Use at your own risk!