15

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

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

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

6

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.