FAQ Database Discussion Community


Meteor autoform add extra input

meteor,meteor-autoform
I would like to get the value of an input in AutoForm.hooks after callback. This input is not part of my schema, it determines what template shows after form submission (and some other behind the scenes stuff). I'm creating the input by using plain html in my autoform template. I...

Autoform: can I specify the options helper in the schema?

meteor,meteor-autoform
Is there any way to specify the options helper in the schema? I tried: Schema { favoriteColor: { type: String, autoform: { options: "colorOptions" } } } But it does not seem to work. The following technique works fine to display a select with options in a form: Schema {...

Uncaught RangeError: Maximum call stack size exceeded in meteor autoform

javascript,meteor,meteor-autoform
This is a very simple application. I do not know why I am getting "Uncaught RangeError: Maximum call stack size exceeded". In folder called 'both', I have a JS file with schema defined as follows Schema1 = new SimpleSchema({ name:{ type:String, label:'Name' } }); In client folder, Now I have...

Creating meteor autoform w/ array of radio buttons

meteor,meteor-autoform
I'd like to build an autoform in meteor that presents user with a twelve radio buttons and records an entry for each of the 12 buttons. I can get the form working easily enough if I create 12 different buttons—see below, but I'm wondering if it is possible to create...

Meteor Autoform input fields only take up half a line instead of entire lines

javascript,meteor,meteor-autoform
I am create a user administration panel and my add user modal looks fine where each input takes up the entire line and the next input is on the next line. In my edit user modal the inputs only use up half a line. Has anyone seen this behavior before?...

How to link image from autoform to user collection in CollectionFS for displaying a profile picture?

javascript,mongodb,meteor,meteor-autoform
Using autoform I saved the user's profile pic that they uploaded into the "images" collection. However I do not know how to call for that specific picture to be loaded on a template. The following does not display the image on the template. However if I change Images.find({'doc.metadata.ownerId':Meteor.userId()}); to Images.find(),...

Meteor get data from form that is defined by a schema

javascript,meteor,meteor-autoform
I am trying to set up a form that is for user creation. The emails portion of the schema is set up as an array: ... "emails.$.address": { type: String, blackbox: true }, "emails.$.verified": { type: Boolean, optional: true, blackbox: true }, ... I use auto form to create the...

Meteor template not updating when template helper re-runs

meteor,reactive-programming,meteor-autoform,meteor-helper
I am trying to make a custom form wizard that will contain different autoform steps based on certain conditions. A simplified meteorPad example is linked below. When the reactive data source(session variable) changes the reactive computation(template helper) runs, confirmed by console output. The template, however, is not updated and still...

Meteor autoform Form hidden fields not rendering defaultValue and not saving

meteor,meteor-autoform
I have two hidden fields in my autoform Schema defined as shown below. I wish to save those two fields with other fields while not showing them to the app user. But I noticed from the autoform rendered html that the two hidden fields have no value, also they don't...

Route to the new data submitted by Meteor autoform using iron router?

meteor,iron-router,meteor-autoform
I'm using Meteor with AutoForm & Iron Router. I have an autoform for inserting a data, and I want to redirect to the page of the data I added after a successful insert. How should I do it? Here is the For: {{#autoForm collection="Products" id="add" type="insert"}} <h4 class="ui dividing header">Products...

Consider Publish/Subscribe rules outside of templates (Meteor)

meteor,meteor-autoform
I have an app where each User has a Counter object associated with it. The User is subscribed to the corresponding Counter. Each time a user submits the form, I want to save the current value of the User's Counter to the form. However, the client and server disagree on...

How to add new object into Array using AutoForm?

meteor-autoform
I have simple schema looking like: Schema = new SimpleSchema name: label: "Order title" type: String optional: true offers: type: Array optional: true 'offers.$': type: Object 'offers.$.name': type: String min: 3 'offers.$.selected': type: Boolean defaultValue: false Firs I'm inserting new entry into Mongo collection. The, when I already have it,...

Meteor: How can I embed template tags within other template tags?

javascript,meteor,meteor-autoform
For example, I have an input field in my Meteor template: {{> afQuickField name="mobile" options="auto" label="Your mobile number"}} Then I start building an internationalised site, which means I need i18n the label text. Using anti:i18n, you can have internationalised text like this: {{i18n "signup.form.mobile"}} Now, how can I put this...

Recording username with meteror autoform

meteor,meteor-autoform
I'm creating a form using cfs:autoform to capture a photo and caption from submitted on the client like this: Photos = new Mongo.Collection("photos"); Photos.attachSchema(new SimpleSchema({ userId:{ type: String, autoValue:function(){return this.userId}, }, userName:{ type: String, autoValue:function(){return Meteor.users.find({_id: this.userId}).username}, }, groupMembers: { type: String }, comments: { type: String }, fileId: {...

meteor autoform string array shows empty field

arrays,meteor,meteor-autoform
I make edit form for some collection, it has Array fields 'phones', each element is String When I trying to make afArrayField from this field it shows block with one empty string Schema: {phones: {type: Array, minCount: 1, label: "Phones numbers"}, {"phones.$": {type: String} } Template: {{> afQuickField name="phones" value=phones}}...

Meteor simple-schema array should have defaultValue none

javascript,meteor,meteor-autoform,meteor-collection2
I have a form for people to create an event that will later have members, though not at time of creation. When the event is created, no members should be added, so the autoform shows no member field: createEvent.jade template(name="createEvent") +quickForm(collection="Events" id="createEventForm" type="insert" fields="name,description,location") For the form to submit, I...

TypeError: Cannot read property 'slice' of null

meteor,meteor-autoform,meteoric
I am using autoform in my project and getting this error when I open the form 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, template...

AutoForm fields

javascript,meteor,meteor-autoform
I am creating a form by using the package aldeed:autoform So this how my code is CompanyData = new Mongo.Collection('companyData'); CompanyData.attachSchema(new SimpleSchema({ allFields: { type: String, allowedValues: ['title', 'logo', 'url'], autoform: { type: "selectize" } }, title:{ type:'String', label:'Name', unique:true, max:100 }, logo:{ type:'String', label:'Logo', optional:true } })); This is...

Meteor ReactiveVar - TypeError: Cannot call method 'set' of undefined

javascript,meteor,meteor-autoform,meteor-helper
I tried to use ReactiveVar. I doesnt know how to handle ReactiveVar. Here the code I have tried. Template.Home.helpers({ names: function(){ temp = Template.instance().name.get(); return temp; } }); Template.Home.onCreated(function () { this.name = new ReactiveVar(); Meteor.call("getNames", function(error, result) { if(error){ alert("Oops!!! Something went wrong!"); return; } else { this.name.set(result); //...

Meteor - Autoform combine date and time fields after submission

meteor,meteor-autoform
I am using autoform to generate an "event" form. On the event I have a start date, start time, end date, end time. In the database I only want to store "start" and "end" which would be the dates and times combined. I can do this manually, but I'm having...

Getting Meteor Autoform to display input box only when something selected from a list?

meteor,meteor-autoform
I've got a select box that asks the user "How did you hear about us?" The options are Google, Yelp, and Other (Please Specify). How do you get Autoform to reveal a blank text input box when the "Other" option is selected and also to use Autoform to validate the...

How to update value in Autoform Placeholder

javascript,mobile,meteor,meteor-autoform
I have a form where I want to update user information. I want to provide the update form with current user data located in placeholder. This data will be provided using a routecontroller. However it does not work. I was wondering if there is any solution to this. {{> afFieldInput...

What is the best way to sandbox collections in meteor?

meteor,meteor-autoform
I want to isolate each user's data from all other users. What is the best way to keep a user viewing and modifying only her stuff? My approach has been to Add a userId field on every collection Configure every published collection to filter on userId. Use simple-schema with collections2...

Verifying schema on Meteor Method using autoform

javascript,meteor,meteor-autoform,meteor-collection2
I'm using autoform, collection2. I want to use method call type for insert/update, as I want to add additional fields before saving to database in server. SimpleSchema would check the data in client, but how can I make the data is checked against the schema on server-side as well? My...

AutoForm 5.0.2 nested schema inputs required on update

validation,meteor,nested,schema,meteor-autoform
I have schemas set up so that I can have an array of complex input sets. Something like: address = { street:{ type: String }, city: { type: String }, active_address: { type: Boolean, optional: true }, ... } people: { name:{ type: String }, address:{ type: [address], optional: true,...

Meteor -> aldeed->Auto-form How to customize checkbox

twitter-bootstrap,meteor,twitter-bootstrap-3,uniform,meteor-autoform
I have following schema for checkbox: 'category.isParent': { type: Boolean ,defaultValue: false } Following is auto-form code for checkbox: <div class="row"> <div class="col-lg-8 col-md-offset-5 padding-left-0"> {{> afFieldInput name='category.isParent' id='isParent' template="plain"}} </div> </div> Following is generated source code (copied from firefox ) <div class="checkbox"> <label> <div id="uniform-isParent" class="checker"><span><input data-schema-key="category.isParent"...

Is there any way to show the current saved state with meteor.js autoform package?

javascript,meteor,meteor-blaze,meteor-autoform
I'm using meteor.js with the aldeed:autoform package with its autosave feature and I'm trying to think of a way to show when the form is saving and when all the data has been saved.

Error when updating an object in auto-form with meteor

meteor,meteor-autoform
I have checked the docs but I cannot get my head around this. I have an object that I want to update using Auto-Form and Collections2 with meteor. //Schema Records = new Mongo.Collection('records'); var Schemas = {}; Schemas.Record = new SimpleSchema({ title: { type: String, label: "Title", max: 200 },...

Meteor + Aldeed Autoform :: How to pass parent data?

javascript,meteor,meteor-autoform
So on my page, there's a list of different books getting rendered from Books collection. For each book, there's a form to add some information about the borrower. My current template structures are as follows: <template name="bookList"> {{#each book}} <div class="book"> ... </div> {{> borrowerForm}} {{/each}} </template> <template name="borrowerForm"> <div...

get autoform non-collection forms method return value

javascript,node.js,meteor,meteor-blaze,meteor-autoform
I want to use meteor-autoform for my non-collection forms. I try this approach but I want to get method return value and display it on client. Please guide me how to do this. This is my schema (common.js): Schema = {}; Schema.echoSchema = new SimpleSchema({ echoText: { type: String, label:...

Meteor bootstrap datetimepicker throwing errors and positioned incorrectly

meteor,bootstrap-datepicker,meteor-autoform
I'm getting the following errors and positioning in the screen shot below when I use the autoform bootstrap datepicker. Error: 2meteor.js:887 Exception from Tracker afterFlush function: undefined is not a function TypeError: undefined is not a function at null. (http://localhost:3000/packages/aldeed_autoform-bs-datetimepicker.js?279246d1cf7d4b5603ac030d7466e9bc6e5ac0d1:171:11) Here is the code I have: Packages: aldeed:autoform # Auto...

In Meteor autoform, how to update a collection from a table row?

meteor,meteor-autoform
How can I implement the table in the autoform demo http://autoform.meteor.com/updateaf? It only has code for the update form, but not the clickable table. I'd like to know how the clickable table is linked to the update form. Thank you....

Autoform meteor dependable/cascading selects

select,drop-down-menu,meteor,cascadingdropdown,meteor-autoform
how can I implement 3 dependent selects with autoform in meteor? Here is an example of what I need to achieve http://www.ajaxray.com/Examples/depend.html Thanks in advance for any help

Meteor-AutoForm: How to update select options based on another control

javascript,meteor,meteor-autoform
I've been trawling SO questions for an answer to something that should be very simple but for the life of me I cannot figure it out. Basically I have a meteor-autoform with two select controls: <template name="processFormTemplate"> {{#autoForm id="processForm" collection="Processes" type=formAction doc=doc validation="blur"}} <div class="col-md-12"> {{> afQuickField name="elementId" options=elements}} {{>...