Giter Club home page Giter Club logo

autoform-ionic's People

Contributors

aldeed avatar benstr avatar costinelmarin avatar gwendall avatar lorensr avatar maabed avatar timbrandin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoform-ionic's Issues

Checkbox is not working on ionic template.

I created one field to recieve array of string with this code:

dias: {
type: [String],
optional: true,
autoform: {
type: "select-checkbox",
'label-type': 'placeholder',
placeholder: 'Dias',
options: function () {
return [
{label: "Segunda-Feira", value: 'Segunda-Feira'},
{label: "Terça-Feira", value: 'Terça-Feira'},
{label: "Quarta-Feira", value: 'Quarta-Feira'},
{label: "Quinta-Feira", value: 'Quinta-Feira'},
{label: "Sexta-Feira", value: 'Sexta-Feira'},
{label: "Sábado", value: 'Sábado'},
{label: "Domingo", value: 'Domingo'}
];
}
}
},

Then in QuickFOrm the checkbox fields looks like this:

autoform

Have some way to fix it or it is a bug?

Need to add classes to input divs

I need to add additional classes, namely item-text-wrap, to the div generated by "boolean-checkbox" type, and potentially by other checkbox and radio types. Like this:

<div class="item item-checkbox item-text-wrap">
    <label class="checkbox">
      <input type="checkbox" value="" name="allStatementsTrue" data-schema-key="allStatementsTrue">
    </label>
    Check here if ALL of the above statements are TRUE.
</div>

I'm thinking maybe just add div-class="item-text-wrap" attribute and in the theme templates, append that to the "item item-checkbox" classes.

If you think that's a good way to do it, I can do a PR.

How to set state of Toggle

this package allows to render an ionic Toggle, which is great. Unfortunately I can not figure out how to set the initial state of the toggle. The underlying checkbox is set correctly, but the toggle in the UI is always on. I am using this with simple-schema. Here is a definition where the toggle should be off.

What am I doing wrong?

var geofence = false;
return new SimpleSchema({
             geofence:{
                type: Boolean,
                label: 'In Vicinity',
                defaultValue: geofence,
                autoform: {
                  type: 'toggle'
                  checked: geofence,
                }
              }
});

label=false no longer works

When doing either of the following, a label is still shown.

{{> afQuickField name="response" type="select-radio" options=question.input.options label=false}}
{{> afFieldInput name="response" type="select-radio" options=question.input.options label=false}}

Range / Slider type

This is rather a question than an issue:

Are you planning on integrating the Slider / Range type for autoform?

Cheers

Adding file-upload

Hello,

I'm trying to add file upload capability using cfs:autoform. Unfortunately, the moment meteoric:autoform-ionic package is added to the project, the file upload input button breaks.
Atleast It doesn't show up with the following lines of code:

  {{#autoForm id="insertForm" type="insert" collection="Docs"}}
  {{> afQuickField name="name"}}
  {{> afQuickField name="fileId" type="cfs-file" collection="files"}}
  <button type="submit">Submit</button>
  {{/autoForm}}

So the afQuickField does not generate an input type="file" tag at all in the HTML structure. Anyone else facing this weird issue? I made sure all dependencies for both packages are added to the project.

I just began exploring meteoric, forgive me if i'm doing something obviously wrong. But any light on this would be greatly appreciated, thanks.

Multiple select with options

The layout in portrait on my android device is not optimal. I would much prefer to have the select's label on top of it instead of on it's right side. Right now, it causes the options' text to be cut if too long.

screen shot 2015-02-12 at 15 01 13

TypeError: Cannot read property 'slice' of null for Object.autoFormGetSchemaForField [as getLabelForField]

Not sure if this is because of any versions or dependency, my autoform is not working and I am getting this error, I have the screenshot and the schema code, form code below,
image

<template name="assesmentNew">
  {{#ionModal customTemplate=true}}
    {{# autoForm collection="Assesments" id="assesments-new-form" type="insert"}}
      <div class="bar bar-header bar-stable">
        <button data-dismiss="modal" type="button" class="button button-clear">Cancel</button>
        <h2 class="title">New Assesment</h2>
        <button type="submit" class="button button-positive button-clear">Save</button>
      </div>
      <div class="content has-header overflow-scroll">
        {{> afQuickField name="name" }}
        {{> afQuickField name="email"}}
        {{> afQuickField name="category"}}
        {{> afQuickField name="location"}}
      </div>
    {{/autoForm}}
  {{/ionModal}}
</template>
Assesments = new Mongo.Collection('assesments');

Assesments.before.insert(function (userId, doc) {
  doc.createdAt = new Date();
});


Assesments.attachSchema(new SimpleSchema({
  name: {
   type: String,
    label: 'First Name',
    autoform: {
      'label-type': 'floating',
      placeholder: 'First Name'
    }
  },
  email: {
    type: String,
    label: 'Email',
    autoform: {
      'label-type': 'floating',
      placeholder: 'Email'
  }
  },
  category: {
    type: String,
      label: 'Category',
    optional: true,
    autoform: {
      options: [
        {value: 'General', label: 'General'},
        {value: 'Reported', label: 'Reported'},
        {value: 'Follow Up', label: 'Follow Up'}
      ],
      type: 'select-radio'
    }
  },
 assesmentDate: {
    type: Date,
    label: 'Assesment Date',
    optional: true
  },
  location: {
    type: String,
      label: 'Location',
      autoform: {
      'label-type': 'floating',
      placeholder: 'Location'
    },
    max: 200
  },
 createdBy: {
    type: String,
    autoValue: function() {
    return this.userId
  }
}
  }
    ));

if (Meteor.isServer) {
  Assesments.allow({ 
    insert: function (userId, doc) {
      return true;
    },
    update: function (userId, doc, fieldNames, modifier) {
      return true;
    },
    remove: function (userId, doc) {
      return true;
    }
  });
}

Hooks error: Uncaught ReferenceError: AutoForm is not defined

Hi there,

when I try to add Hooks to autoform-ionic I get the error message:
Uncaught ReferenceError: AutoForm is not defined
I think this is because in your package.js file aldeeds autoform package is just added but not exported of some kind. Is this right?
When I add aldeeds autoform additionally to this package it works fine, but I am wondering whether it makes sense to have both packages installed and also two different autoform versions then.

Wouldn't it be better to export the autoform object from this package so it can be used like so

AutoForm.hooks(...

Regards

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.