-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Be clearer about what the framework API is for newcomers #60
Comments
Thank you for your feedback. I've been working on a docs rewrite, and it should be up very soon. There are several other issues relating to docs improvements, for example Issue #14 (which says this improvement is long overdue). I hope to close all of them this weekend. Until then, please don't hesitate to ask questions in this issue. I will do my best to answer quickly. |
I tried to get the "simplest" thing working, and am having trouble <head>
<title>hello</title>
</head>
<body>
{{> testForm}}
</body>
<template name="testForm">
{{#basicFormBlock schema=schema action=action}}
{{> basicInput field='testField'}}
{{/basicFormBlock}}
</template> and Template['testForm'].helpers({
schema: function () {
return new SimpleSchema({
testField: {
type: String,
max: 3,
instructions: "Enter a value!"
}
});
},
action: function () {
return function (els, callbacks, changed) {
console.log("[forms] Action running!");
console.log("[forms] Form data!", this);
console.log("[forms] HTML elements with `.reactive-element` class!", els);
console.log("[forms] Callbacks!", callbacks);
console.log("[forms] Changed fields!", changed);
callbacks.success(); // Display success message.
callbacks.reset(); // Run each Element's custom `reset` function to clear the form.
};
}
}); I get a form with a field on the screen, but no placeholder text, and nothing happens on submit. brand new project with :- autopublish 1.0.3 Publish the entire database to all clients Meteor 1.1.0.2 |
I think the reason this isn't working for you is that you didn't follow step 3 of the usage guide? |
up and running :) |
{{> testForm}}
{{#basicFormBlock schema=schema action=action}}
{{> basicInput field='testField'}}
{{/basicFormBlock}}
Where do I set the data ? |
Just thought I'd share my initial impression, I'm going to spend more time digging into exactly what the package is doing ( mainly because there aren't too many options to consider ), but I thought it might be useful to get a "never seen it before" impression of the docs.
I just found mention of this package on the forums when looking for an alternative to autoforms, so I came here and read the documentation.
I was totally lost almost straight away. It felt like it was trying to introduce simple concepts, then rushed off on tangents without introducing all the concepts or making it clear what is the framework parts. The code example seems way too big and NOT simple at all. There's a lot of code to work through and its not clear where the framework is being leveraged and how it all hooks together.
I think you need the most MINIMAL and complete example without any other packages.
Then introduce something more complex that shows a lot more of the advantages.
Make it clear what the framework API is.
Ok, that's my first impression, going to go back, and figure it all out now :-)
The text was updated successfully, but these errors were encountered: