Jump to content

is there a list of core field options/properties for module development?


Recommended Posts

Posted

I am trying to make a module and it should create some pages during installation but I need a list of the field type properties/parameters that I can use with the field types.

I've found http://cheatsheet.processwire.com/fields/field-properties/  and https://processwire.com/api/variables/fields/

neither shows the properties available such as how to make a field "required", or format a date field's input or output etc

I'd like to format some dates, require some fields and stuff like that

thanks in advance

Posted

If you go to a field's settings in the admin and then open the Request Info panel in TracyDebugger you'll see this. It's most of the settings available, but some like "required" doesn't show unless you have it checked for the field in question.

image.thumb.png.00bfbb2333b98a09d69b8911112ba2d5.png

 

Alternatively, also while visiting a field's settings, you can do this in the Console Panel:

image.png.266d146cc9512299ab81a7cbec585742.png

  • Like 4
Posted

Besides Adrian's excellent suggestions...

Many of the common inputfield properties are outlined here: https://processwire.com/api/ref/inputfield/

For properties specific to a particular inputfield type you can read the code comments in the core files, or if you have the very handy API Explorer pro module you can browse the properties in a nice interactive interface within the PW backend:

2018-03-15_145032.thumb.png.d2fe5e2013ba9c5d387ba5ad70d1566e.png

  • Like 5

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...