How to use crizmas-form - 10 common examples

To help you get started, we’ve selected a few crizmas-form examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / editor / editor-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'title',
          initialValue: ctrl.article && ctrl.article.title,
          validate: validation.required()
        },
        {
          name: 'description',
          initialValue: ctrl.article && ctrl.article.description
        },
        {
          name: 'body',
          initialValue: ctrl.article && ctrl.article.body,
          validate: validation.required()
        },
        {
          name: 'tagString',

          actions: {
            submit: ctrl.updateTagList
          }
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / settings / settings-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'image',
          initialValue: currentUser.image
        },
        {
          name: 'username',
          initialValue: currentUser.username,
          validate: validation(validation.required(), getUsernameValidator())
        },
        {
          name: 'bio',
          initialValue: currentUser.bio
        },
        {
          name: 'email',
          initialValue: currentUser.email,
          validate: validation.required()
        },
        {
          name: 'password',
          validate: getPasswordValidator()
        }
      ],
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / register / register-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'username',
          validate: validation(validation.required(), getUsernameValidator())
        },
        {
          name: 'email',
          validate: validation.required()
        },
        {
          name: 'password',
          validate: validation(validation.required(), getPasswordValidator())
        }
      ],

      actions: {
        submit: () => {
          ctrl.register(ctrl.form.getResult());
        }
      },

      onFormChange: () => {
        ctrl.serverErrors = null;
      }
    });
  };
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / login / login-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'email',
          validate: validation.required()
        },
        {
          name: 'password',
          validate: validation.required()
        }
      ],

      actions: {
        submit: () => {
          ctrl.login(ctrl.form.getResult());
        }
      },

      onFormChange: () => {
        ctrl.serverErrors = null;
      }
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / settings / settings-controller.js View on Github external
name: 'image',
          initialValue: currentUser.image
        },
        {
          name: 'username',
          initialValue: currentUser.username,
          validate: validation(validation.required(), getUsernameValidator())
        },
        {
          name: 'bio',
          initialValue: currentUser.bio
        },
        {
          name: 'email',
          initialValue: currentUser.email,
          validate: validation.required()
        },
        {
          name: 'password',
          validate: getPasswordValidator()
        }
      ],

      actions: {
        submit: () => {
          ctrl.update(ctrl.form.getResult());
        }
      },

      onFormChange: () => {
        ctrl.serverErrors = null;
      }
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / register / register-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'username',
          validate: validation(validation.required(), getUsernameValidator())
        },
        {
          name: 'email',
          validate: validation.required()
        },
        {
          name: 'password',
          validate: validation(validation.required(), getPasswordValidator())
        }
      ],

      actions: {
        submit: () => {
          ctrl.register(ctrl.form.getResult());
        }
      },

      onFormChange: () => {
        ctrl.serverErrors = null;
      }
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / login / login-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'email',
          validate: validation.required()
        },
        {
          name: 'password',
          validate: validation.required()
        }
      ],

      actions: {
        submit: () => {
          ctrl.login(ctrl.form.getResult());
        }
      },
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / register / register-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'username',
          validate: validation(validation.required(), getUsernameValidator())
        },
        {
          name: 'email',
          validate: validation.required()
        },
        {
          name: 'password',
          validate: validation(validation.required(), getPasswordValidator())
        }
      ],

      actions: {
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / settings / settings-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      children: [
        {
          name: 'image',
          initialValue: currentUser.image
        },
        {
          name: 'username',
          initialValue: currentUser.username,
          validate: validation(validation.required(), getUsernameValidator())
        },
        {
          name: 'bio',
          initialValue: currentUser.bio
        },
        {
          name: 'email',
github gothinkster / crizmas-mvc-realworld-example-app / src / js / pages / article / article-controller.js View on Github external
const init = () => {
    ctrl.form = new Form({
      actions: {
        submit: () => {
          ctrl.postComment(ctrl.form.getResult());
        }
      }
    });
  };

crizmas-form

Form tools used in conjunction with the crizmas-mvc framework.

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis