Creating Custom Presets?

5 posts by 4 authors in: Forums > CMS Builder
Last Post: November 16, 2009   (RSS)

By (Deleted User) - November 4, 2009

If we wanted to how do create our own Custom Presets?

Re: [Luke] Creating Custom Presets?

By (Deleted User) - November 14, 2009

@Luke

By the ability to add preset is very nice and i will be using it a lot, but i have a question about it:

what are the options when creating a field in the preset. For example:

[userID]
order = 7
label = "User ID"
type = "textfield"
defaultValue = ""
description = ""
fieldWidth = ""
isPasswordField = 0
isRequired = 1
isUnique = 1
minLength = ""
maxLength = ""
charsetRule = ""
charset = ""


How would i make this field an integer field with a particular length and making it an auto_increment?

I guest the real question is, do you have a list of all the options available to create a field in a preset?

Cheers!

Re: [LeQueb] Creating Custom Presets?

By Dave - November 16, 2009

Hi LeQueb,

There's no user documentation for the fieldnames used in the schema datafiles.

That said, you can find a list of the fields and their default values in the php code at the top of /cmsAdmin/lib/menus/database/editField_functions.php

You can specify custom mysql column types through CMSB under: Admin > Section Editors > Your Section > Field Editor > Your Field > Advanced Options > MySQL Column Type

And this gets saved in the schema data file like this:
customColumnType = "INT"

And everything is hardcoded to use the 'num' fieldname as the default id field and have it be auto_increment.

Hope that helps! Let me know if you have any other questions. :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Creating Custom Presets?

By (Deleted User) - November 16, 2009

Ok perfect, so i build my tables in CMS Builder and retrieve the out .ini file in /data/schema/MY FILE.ini.php. Very nice and simple, thanx.