Giter Club home page Giter Club logo

forms.js's People

Contributors

corners2wall avatar danieljames08 avatar mrblackghostt avatar trilmatic avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

forms.js's Issues

Convert validation error strings into imported variables

This applies to the /packages/core

Instead of 'This field is required' string for example have an imported variable potentially from constants.ts file.
This needs to be done for all validation static field in core package.

Move docs to github repo

Move docs to this repo and pull them from github on main website so they are editable along with source changes

Clickable form builder on main website

An clickable form builder on main website where you can create forms by drag and droping fields and defining parameters.

This form can be then output into json file and from this file it can be loaded (Form class could be initiated on that json file and would create the form like normal)

Global settings to define defaults for all different fields

We could create some global definitions that would allow to one time configure of the forms.js.
It would allow to pass overwritten defaults and any other things needed for the fields so there is not need to pass it into each field.

Additionally this could also allow to define input versions based on settings, so instead if having to type all default settings you could just define sub input like text-custom that would auto initialize with certain defaults and settings.

Why would this be useful? If I have a custom icon that I want for the input currently I would have to pass this long string or URL or something into each input I would want with the icon. That would be annoying and clutter the code. Instead I could define default one time in main.js similar to how license is now works. Any initialization of the field would then pull the custom defaults if available.

address field

This new field should be a mix of multiple fields under the hood. Also it should be available to connect custom autocomplete into it.

Could be done through using group with multiple fields. It should have change method where all address parts are passed.

String based conditions

Create a string based conditions logic. conditions option should now accept string or function.

the logic behind should be something like 'myfield=1&myfield=2|myfield=3'; and this defines that if myfield value is 1 and 2 or 3 then the field should be hidden.

Have an option to first generate the form and then mount it on element later

Just have an option like

buildForm(FormOptions)
mountForm(Form, element)

The reason why this would be usefull is when we will be using the formsjs with reactive frameworks we could let asynchronously generate the form before the content is rendered and then render the form with the rest of the page istead of waiting for container element to render and init the form after that. Could make a difference in render speed on very large forms.

How exactly would this be done needs to be designed yet, this is just a very simple example and reasoning.

Update core and default repo readme

  • BADGES (Not sure what to put there yet, maybe someone will have some idea. Just need to make it look better)
  • look at styles of good repos and try to update based on that

Set each major class as default export

Set each major class as default export from the main files:

  • packages/core/field.ts
  • packages/core/group.ts
  • packages/core/button.ts

Update all imports accordingly.

Create npm run publish script

Create npm run publish script that updates the version of package, automatically creates commit and runs npm publish

get rid of any types

We still have some any types in the project that can be removed.

Not all of the any types can be but most of them should be converted to proper types.

Stars field

Create and rating field visualized by stars.

server side select field

We want to prepare server side select field. It will be done through tom select as it already has options, just connect the tomselect ssr fetch to fields options accordingly.

box field

We want to implement new box field which will be radios but with custom content instead of radio buttons.

Each radio button should have template option. And it should come with default styles.

Merge some get functions into one on Form class

on Form class in core package merge methods:

  • getButtons into getButton (when no parameters passed)

  • getGroups into getGroup (when no parameters passed)

  • update getField method to return all fields when no parameter passsed

In scope of this task:

  • still keep of getButtons and getGroups but mark as deprecated
  • update documentation
  • update automated tests in form.test.ts

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.