I see intermittent use of filter="safehtml" and filter="string" throught Joomla forms. Is there a complete list, and can custom filters be created?

  • FYI: The JForm filters are now in /libraries/src/Form/Form.php method filterField – bertmert Jul 1 '18 at 16:16

The possible filters are:

  • rules (Access Control Rules)
  • unset (Do nothing, thus leaving the return value as null)
  • raw (No filter)
  • int_array (Filter the input as an array of integers)
  • safehtml (Filter safe HTML)
  • server_utc (Convert a date to UTC based on the server timezone offset)
  • user_utc (Convert a date to UTC based on the user timezone offset)
  • url (URL filter which also ensure the protocol is present)
  • tel (Filter for phone number. It will try and match against specific patterns, else return a string of numbers)

For a full list of jInput filters and how to use them, see Retrieving request data using JInput.

Hope this helps

  • Where did you get/find this? Am looking at joomla\libraries\filter\input.php, and see some from your list and others that you haven't included. – GDP Dec 22 '14 at 20:57
  • @GDP - The filters in the file you mentioned are for JInput as show here – Lodder Dec 22 '14 at 21:01
  • Ah, there it is....always have a hell of a time finding it, so thought it was a worthwhile question. – GDP Dec 22 '14 at 21:04
  • No worries. As for the custom filters, you can most likely create your own by extending the class, but have never tried this. – Lodder Dec 22 '14 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.