create_form

Description
GET - Display the creation form of an entity

Methods


start( data )

Description
Called at route start
Parameters
Name Type Description
data object
Name Type Attributes Description
req object Request - See expressjs definition
res object Response - See expressjs definition
transaction object <optional>
Database transaction. undefined by default, provide your own when necessary
enum_radio object Entity enum fields translations
renderFile string Dust file to render

ifFromAssociation( data )

Description
In case the creation form was called from an entity tab, it means that we've got to associate the created entity to a parent
Parameters
Name Type Description
data object
Name Type Attributes Default Description
req object Request - See expressjs definition
res object Response - See expressjs definition
transaction object <optional>
Database transaction. undefined by default, provide your own when necessary
enum_radio object Entity enum fields translations
renderFile string Dust file to render
associationFlag integer ID of the entity that ask for a creation formulaire of the current entity
associationSource string Entity name that ask for a creation formulaire of the current entity
associationUrl string The url string of the entity source
associationForeignKey integer The concerned foreign key between the two entities
associationAlias string Alias that represent the relation between the two entities
subentity string this.entity ajax request only - Name of entity without prefix
action string /this.entity/create ajax request only - Action of create form
method string post ajax request only - Method of create form
fieldsFile string this.e_entity/create_fields ajax request only - Fields file to insert into the form

beforeRender( data )

Description
Called before render of data.renderFile
Parameters
Name Type Description
data object
Name Type Attributes Default Description
req object Request - See expressjs definition
res object Response - See expressjs definition
transaction object <optional>
Database transaction. undefined by default, provide your own when necessary
enum_radio object Entity enum fields translations
renderFile string Dust file to render
associationFlag integer ID of the entity that ask for a creation formulaire of the current entity
associationSource string Entity name that ask for a creation formulaire of the current entity
associationUrl string The url string of the entity source
associationForeignKey integer The concerned foreign key between the two entities
associationAlias string Alias that represent the relation between the two entities
subentity string this.entity ajax request only - Name of entity without prefix
action string /this.entity/create ajax request only - Action of create form
method string post ajax request only - Method of create form
fieldsFile string this.e_entity/create_fields ajax request only - Fields file to insert into the form