I am looking for possible filters' list when adding parameters' field for a module settings.
I know that filter="raw" and filter="integer" exists from examples at Text form field type.
But what are other possible filters for these fields?
I am looking for possible filters' list when adding parameters' field for a module settings.
I know that filter="raw" and filter="integer" exists from examples at Text form field type.
But what are other possible filters for these fields?
I am not totally sure if this is it, but may want to see this list directly from the code, with the method clean()
.
So the list would be:
Let me know if this helps.
media
for images... at least I'm using it. Personally I'm looking for something like URL... –
Colwell Posting as a guest so I couldn't comment ;) You might also find the list of available field types useful for capturing data like URLs and emails. You can find the full list here. Also available in the folder structure at libraries/cms/form/field
and libraries/joomla/form/fields
. There are URL and email fields which, I believe, include the relevant filtering. Usage would be as follows in the .xml:
<field name="myAwesomeURL" type="url" class="awesome"></field>
This renders as a text input box.
filter
, not field
. –
Gandhiism To be precise, Joomla starts applying the filter with this filterField
function. In this code, you can see some more filter
types like TEL
, SAFEHTML
or so. From this function, if there's no match, it will go further to the one mentioned by @ValentinDespa. It also enables you to call your own function, as long as it's "callable". I found out this scattering after I looked into code by another dev having filter="intval"
.
Hope that helps!
© 2022 - 2024 — McMap. All rights reserved.