bmacnaughton Posted February 18, 2015 Share Posted February 18, 2015 Where can I find a list of all field types? I've been to http://modules.processwire.com/categories/fieldtype/ and http://modules.processwire.com/categories/inputfield/. But while they list a number of field types they don't seem to list the basics, e.g., InputfieldText, InputfieldHidden, InputfieldSubmit. I am seeing these in the context of $field = wire('modules')->get('InputfieldText'). If someone can just point me at documentation for constructing fields in this way it would be great. In particular I'm looking for a list of the field types and what classes get attached to the items (or how classes are attached to them). Link to comment Share on other sites More sharing options...
kongondo Posted February 19, 2015 Share Posted February 19, 2015 /wire/modules/Fieldtype/ /wire/modules/Inputfield/ 1 Link to comment Share on other sites More sharing options...
bmacnaughton Posted February 19, 2015 Author Share Posted February 19, 2015 Thank you. I looked for it on the site; never really thought to look locally. But your answer highlights where built-in modules are stored - thank you. This is also a missing piece for me in terms of how the API maps to the files that implement the function. Very useful answer. Link to comment Share on other sites More sharing options...
adrian Posted February 19, 2015 Share Posted February 19, 2015 You might also find this useful: echo $fieldtypes->implode('<br />', 'name'); It will list out the names of all installed fieldtypes, both core and those from site modules that you have installed. 5 Link to comment Share on other sites More sharing options...
Pierre-Luc Posted February 19, 2015 Share Posted February 19, 2015 Another thing you might be interested in is using ApiGen to generate docs for core. PW is fairly well documented in code apart from some places, and you'll find most of what you need there. 3 Link to comment Share on other sites More sharing options...
kongondo Posted February 19, 2015 Share Posted February 19, 2015 Another thing you might be interested in is using ApiGen to generate docs for core. PW is fairly well documented in code apart from some places, and you'll find most of what you need there. Yep, this is what I do. Make sure to tell it to generate docs from .module files as well, not just .php 2 Link to comment Share on other sites More sharing options...
pwFoo Posted June 4, 2015 Share Posted June 4, 2015 I try to group Fields / Inputfields by needed sanitizer, but how should I do it? I looked into the field objects (var_dump) and it looks like this won't work. I tested $field->class (InputfieldText has an empty class property?) and $field->type (InputfieldCKEditor is type text...?). At the moment I have to use "class" to identify an FieldtypeTextarea (sanitizer textarea) and InputfieldEmail should be easy. All other fields I would set sanitizer "text" as default (overwrite / remove by custom value...). Is there a consistent / simply way to group Inputfields by a proper sanitizer type? Should sanitizer "groups" text, textarea and email enough as a basic and automatic sanitizing? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now