addfieldtotab data types in SIlverstripe -


below theexample silverstripe.org addfieldtotab

 $fields->addfieldtotab('root.main', datefield::create('date','date of article'));        $fields->addfieldtotab('root.main', textareafield::create('teaser'));     $fields->addfieldtotab('root.main', textfield::create('author','author of article')); 

it show text type textareafield, varchar textfield, date datefield.

but other data types, can find in documentation following,

boolean compositedbfield currency datetime decimal double enum float foreignkey htmltext htmlvarchar int money multienum percentage primarykey text time year

for complete list of fields check out subclasses listed @ http://api.silverstripe.org/3.1/class-formfield.html. field types flexible , can support multiple data types or relations, particular data types can represented variety of form fields. can create own field types subclassing formfield. depends on context best fit.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -