Code Monkey home page Code Monkey logo

form-builder's Introduction

Form Builder

NPM Version Maven Central Build Status

Create html input forms on the fly

Installation

npm install @uportal/form-builder

Usage

<form-builder
    fbms-base-url="/fbms"
    fbms-form-fname="communication-preferences"
    oidc-url="/uPortal/api/v5-1/userinfo"
    styles="div {color:grey} span {color:orange}">
</form-builder>

Properties

  • fbms-base-url: Base URL of the form builder micro service.
  • fbms-form-fname: Form name that is appended to the fbms-base-url.
  • oidc-url: Open ID Connect URL to authenticate requests.
  • styles: Optional pass-through value to an HTML style tag in the render method.

Resources

form-builder's People

Contributors

bjagg avatar cbeach47 avatar christianmurphy avatar drewwills avatar mindblender avatar renovate-bot avatar rmathis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

form-builder's Issues

Refactor properties on the custom element

Currently we have (to the best of my knowledge)...

            <form-builder
              fbms-base-url="/fbms/api/v1/forms/"
              fbms-form-name="communication-preferences"
              response-url="/fbms/api/v1/responses/"
              oidc-url="/uPortal/api/v5-1/userinfo">
            </form-builder>

Better would be (as far as I can see)...

            <form-builder
              fbms-base-url="/fbms"
              fbms-form-fname="communication-preferences"
              oidc-url="/uPortal/api/v5-1/userinfo">
            </form-builder>

Differences:

  • fbms-base-url does not include the /api/v1/forms/ path info (which can be hard-coded)
  • fbms-form-name has been renamed to fbms-form-fname
  • response-url is not required (b/c it can be infered from fbms-base-url just as easily as the /forms/ endpoint)

Also Note

The URI for users' previous responses is /fbms/api/v1/submissions, not /fbms/api/v1/responses.

Validation errors continue to display, even after the user corrects them

The form-builder UI is now correctly displaying server-side validation errors.

But I notice now that if I produce a validation error and then correct it, the error still displays (in red) when I re-submit the form. The submission is a success, and the updated/corrected version is saved, but the user is told that the validation issue is still a problem.

Build to a consistently- and meaningfully-named js file

Currently the project builds to a file with a name like main.e3b45x7.js.

I understand the reasons for this practice, but it plays havoc with...

  • The build system that may need to copy this file
  • The portlet-definition.xml that needs to reference this file in (static) HTML

Please build to form-builder.js or somesuch.

uPortal-contrib

uPortal contrib is a common space for uPortal web components and microservices to be shared with the Apereo community.
Repositories can be added through an intake process.
uPortal form build has gone through the intake process and been approved.
https://groups.google.com/a/apereo.org/d/msg/uportal-dev/P2f3srF8Gxk/o3rExWAZAgAJ

There are a few options for how this repo could be shared with uPortal contrib.

  1. Repo is transferred to uPortal contrib
  2. Repo is forked to uPortal contrib
  3. Repo is mirrored to uPortal contrib

Usually option 1 is preferred because it preserves the issue tracker through the migration.
Thoughts on next steps @cparaiso ?

v1.3.0 crashes IE / Edge

After upgrading from 1.2.1 to 1.3.0, IE / Edge crashes. Not clear which commit(s) between the versions are at fault.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.