GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - node4good/formage: Bootstraped Admin GUI addon for mongoose, jugglingdb, or just as a form generator

BranchesTags
Open more actions menu

Latest commit

 

History

1,106 Commits
1,106 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea/runConfigurations
.idea/runConfigurations
 
 
.tmp
.tmp
 
 
assets
assets
 
 
example
example
 
 
generated
generated
 
 
lib
lib
 
 
test
test
 
 
utils
utils
 
 
views
views
 
 
.bowerrc
.bowerrc
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.jshintignore
.jshintignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bower.json
bower.json
 
 
package.json
package.json
 
 

Repository files navigation

Formage

Bootstraped Admin GUI addon for Mongoose, JugglingDB, or just as a form generator. Originally forked from mongoose-admin.

Build Status

NPM

Example Usage

var express = require('express'),
    app = express();

require('formage').init(app, express, models);

Look at the \example directory.

Options

// Site-wide options, and their default values
require('formage').init(app, express, models, {
    title: 'Admin',
    root: '/admin',
    default_section: 'main',
    username: 'admin',
    password: 'admin',
    admin_users_gui: true
});

Model options

var model = new mongoose.model('songs', schema);

// external files specific to this model
model.header_lines = [
   '<script src="/js/songs.js"></script>',
   '<style href="/css/songs.css"></style>'
];

model.formage = {
    // one-document models
    is_single: true,

    // labels
    label: 'My Songs',
    singular: 'Song',

    filters: ['artist', 'year'],

    // additional actions on this model
    actions: [
       {
          id: 'release',
          label: 'Release',
          func: function (user, ids, callback) {
             console.log('You just released songs ' + ids);
             callback();
          }
       }
    ],

    // list of fields to be displayed by formage for this model
    list: ['number', 'title', 'album', 'artist', 'year'],
    
    // order documents, save order in this field (type: Number)
    sortable: 'order',

    // list of order fields
    order_by: ['-year', 'album', 'number'],

    // list of fields that must be populated
    // (see http://mongoosejs.com/docs/api.html#document_Document-populate)
    list_populate: ['album'],

    // list of fields on which full-text search is available
    search: ['title', 'album', 'artist']
};

Fields

Formage comes with the following built-in fields, but custom fields can be written if needed.

  • String
  • Boolean
  • Number
  • Date
  • Time
  • Enum (select2)
  • Ref (select2)
  • Text (<textarea>)
  • HTML (ckeditor)
  • FilePicker (File Picker)
  • Picture (File Picker)
  • GeoPoint (Google Maps)

You can pass options to the underlying fields and widgets:

var schema = new mongoose.Schema({
    artist: { type: String, label: 'Who made it?' },
    location: { type: Schema.Types.GeoPoint, widget_options: { lang: 'nl' }}
});

(The map widget lang setting is a two-letter ISO 639-1 code.)

Hmm

  • Extend formage with your custom field
  • Embed a formage form outside of the admin

License

MIT

Sponsor

![](http://i.imgur.com/ynQ6c.png)

About

Bootstraped Admin GUI addon for mongoose, jugglingdb, or just as a form generator

formage.io

Resources

Readme
MIT license
Activity
Custom properties

Stars

184 stars

Watchers

14 watching

Forks

51 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.