Wiredcraft / jekyllpro-cms

A lightweight CMS for Jekyll websites.
http://jekyllpro.com/#cms
MIT License
7 stars 2 forks source link

Widgets for form #19

Closed hunvreus closed 7 years ago

hunvreus commented 7 years ago

We have basic list of form elements, but we need to expand and improve it.

A few types;

  1. String; regular input box.
  2. Text; should be a textarea. Don't think we have that yet.
  3. Markdown/HTML; should be restricted to the body for now.
  4. Select; string with predefined values (enum?).
  5. Multiple strings; multiple strings but no predefined values. From http://selectize.github.io/selectize.js/, as an example: screen shot 2016-12-06 at 5 08 16 pm
  6. Multi-select; multiple strings from predefined list of values (enum?). From http://selectize.github.io/selectize.js/, as an example: screen shot 2016-12-06 at 5 08 33 pm
  7. Email; regular HTML5 email field?
  8. Integer; regular HTML5 integer field?
  9. Date; regular HTML5 integer field? This one we may want to use some kind of widget to be able to distinguish date and time and date+time.
  10. Boolean; there's already code for styling checkboxes into switches;

    <div class='field'>
      <label for='checkbox'>Latest update</label>
      <label class='switch'>
        <input id='checkbox' type='checkbox' />
        <span class='slider'></span>
      </label>
    </div>

    Should look like (at least in the update I'll give you):

    screen shot 2016-12-06 at 5 30 48 pm

If we do have a similar widget for 5. and 6.

woodpig07 commented 7 years ago

I made a content file to demo some typical form widgets: /master/_products/some-new-products.md

The schema file behind it: /master/_schemas/sample.json

mpathiuk commented 7 years ago

There have been incoming requirements for the next form widgets:

cc @woodpig07 @hunvreus

woodpig07 commented 7 years ago

Completed, closing