javascript - My meteor autoform wont submit, but there are no errors, what's wrong? -
i using couple of packages in meteor web app, including aldeed:autoform , aldeed:collection2. made schema , attached database. auto generated form it, includes submit button. submit button worked when first generated it, not when run meteor app not work once press submit. checked git linked folder , doesnt there have been changes made effect this. there way can debug autoform? i'm not sure do, great.
here relevant code in main.js file:
createlobby = new mongo.collection("createlobby"); createlobbyschema = new simpleschema({ game: { type: string, label: "game" }, console: { type: string, label: "console" }, players: { type: number, label: "players" }, mic: { type: boolean, label: "mic" }, note: { type: string, label: "note" }, gamertag: { type: string, label: "gamertag" } }); createlobby.attachschema( createlobbyschema ); meteor.subscribe("createlobby");
and on server main.js:
createlobby = new mongo.collection("createlobby"); createlobby.allow({ 'insert': function (userid,doc) { return true; } }); meteor.publish("createlobby", function(){ return createlobby.find(); });
and html call it:
{{#autoform collection="createlobby" id="insertlobbyform" type="insert"}} <fieldset> {{> afquickfield name="game"}} {{> afquickfield name="console"}} {{> afquickfield name="players"}} {{> afquickfield name="mic"}} {{> afquickfield name="note" rows=2}} {{> afquickfield name="gamertag"}} <div> <button type="submit" class="btn btn-primary">submit</button> <button type="reset" class="btn btn-default">reset</button> </div> </fieldset> {{/autoform}}
Comments
Post a Comment