Comments (10)
Hi @pkumar-uk sorry for the delay I missed this issue. Could you please to ensure proper reproduction add the two autoForm/quickForm defnitions for your insert and update use cases? Thank you, I will then start investigating.
from meteor-autoform.
The following one is another example where it does not work. Please let me know if more information is required. Thanks
--- Schema
let SchemaToDo = new SimpleSchema({
schoolId: { type: String, optional: false },
createdDt: {type: Date, optional: false},
creationId: {type: String, optional: false},
creationUId: {type: String, optional: false},
creationBy: {type: String, optional: false},
modiDt: {type: Date, optional: true},
modiId: {type: String, optional: true},
modiUId: {type: String, optional: true},
modiBy: {type: String, optional: true},
priority: {type: String, optional: false},
status: {type: String, optional: false},
shortDesc: {type: String, optional: false},
longDesc: {type:String,label: "Content",optional: true,
autoform:{
afFieldInput:{
type: 'summernote',
class: 'editor',
settings:{height: 200,
minHeight:200,
maxHeight:null,
imageCollection:'Images',
}
}}},
attachURLMulti: {type: Array,
label:'Please select supporting docs',
optional: true,
autoform: {
type: 'slingshot', // (required)
multi: true,
ui: {
noPreview: true,
hideDownload: true,
showDownloadAll: false
},
slingshot: {
directives: [{
name: 'otherLoad'
}]
}
}
},
"attachURLMulti.$":{type:afSlingshot.fileSchema},
statusDesc: {type:String,label: "Status",optional: true,
autoform:{
afFieldInput:{
type: 'summernote',
class: 'editor',
settings:{height: 200,
minHeight:200,
maxHeight:null,
imageCollection:'Images',
}
}}},
statusURLMulti: {type: Array,
label:'Please select supporting docs',
optional: true,
autoform: {
type: 'slingshot', // (required)
multi: true,
ui: {
noPreview: true,
hideDownload: true,
showDownloadAll: false
},
slingshot: {
directives: [{
name: 'otherLoad'
}]
}
}
},
"statusURLMulti.$":{type:afSlingshot.fileSchema},
primaryId: {type: String, optional: false},
primaryName: {type: String, optional: false},
teamIds: {type: Array, optional: true},
"teamIds.$": {type: String, optional: true},
teamNames: {type: Array, optional: true},
"teamNames.$":{type: String, optional: true},
infoIds: {type: Array, optional: true},
"infoIds.$": {type: String, optional: true},
infoNames: {type: Array, optional: true},
"infoNames.$":{type: String, optional: true},
todoBy: {type: Date, optional: false},
});
---- Insert
{{#autoForm collection="ToDo" schema=schema id="instodoMain" template="bootstrap3-horizontal" type="insert" validation="submit"}}
{{> afQuickField name='shortDesc' label="Title"}}
{{> afQuickField name='longDesc' placeholder='To do Description..'}}
{{> afQuickField name='attachURLMulti' label="Any attachement?"}}
{{> afQuickField name='priority' type="select-radio-inline" label="Priority" options=optPriority}}
{{> afQuickField name='todoBy' type="datetimepicker" label="To be done by Date/Time"}}
{{> afQuickField name='primaryId' type="select2" options=optStaffList label="Primary Responsible"}}
{{> afQuickField name='teamIds' type="select2" multiple=true options=optStaffList label="Team Members"}}
{{> afQuickField name='infoIds' type="select2" multiple=true options=optStaffList label="Inform Members"}}
<div class="form-group">
<button type="submit" class="btns3 btn btn-sm btn-primary">Insert</button>
<button type="reset" class="btn btn-sm btn-default">Reset</button>
</div>
{{/autoForm}}
--- Update
{{#autoForm collection="ToDo" schema=schema id="updtodoMain" doc=doc template="bootstrap3-horizontal" type="update" validation="submit"}}
{{> afQuickField name='shortDesc' label="Title"}}
{{> afQuickField name='longDesc' placeholder='To do Description..'}}
{{> afQuickField name='attachURLMulti' label="Any attachement?"}}
{{> afQuickField name='priority' type="select-radio-inline" label="Priority" options=optPriority}}
{{> afQuickField name='todoBy' type="datetimepicker" label="To be done by Date/Time"}}
{{> afQuickField name='primaryId' type="select2" options=optStaffList label="Primary Responsible"}}
{{> afQuickField name='teamIds' type="select2" multiple=true options=optStaffList label="Team Members"}}
{{> afQuickField name='infoIds' type="select2" multiple=true options=optStaffList label="Inform Members"}}
<div class="form-group">
<button type="submit" class="btns3 btn btn-sm btn-primary">Insert</button>
<button type="reset" class="btn btn-sm btn-default">Reset</button>
</div>
{{/autoForm}}
-- helper
optPriority: ()=> {
return [
{label:'High', value:'High'},
{label:'Medium', value:'Medium'},
{label:'Low', value:'Low'},
]
}
from meteor-autoform.
I tried to reproduce with a fresh new repo but for me the update form actually updated the document.
Can you take the time and create a minimal GitHub repo, containing only the insertform and update form to allow me to reproduce this issue? Please also do not include any other fields, than the ones involved in the issue (the select radio fields) to avoid any side-effect.
from meteor-autoform.
I think the issue is not that. The update does work. It is just that in update mode the radio field does not get populated with old value, when Autoform is opened in update mode. If you are not seeing in your code, I will create a min GitHub repo.
from meteor-autoform.
Please find mini repo https://github.com/pkumar-uk/testapp.git
Not very neat but will help you see the issue.
Insert some records and try updating. The radio type input is not initialised.
from meteor-autoform.
Please let me know if more information is needed.
from meteor-autoform.
Hey @pkumar-uk the problem lies within the theme and the bootstrap custom radio-button component and not AutoForm itself. Let me check, if there is a potential solution to this
from meteor-autoform.
Created a fix here: Meteor-Community-Packages/meteor-autoform-themes#5
Please checkout and review, if possible so it can be merged and published soon
from meteor-autoform.
Apologies for not looking at this issue as I had an workaround. I want to confirm that I have tested the changes and they seem to be working
from meteor-autoform.
It should be fixed in version 1.0.6
from meteor-autoform.
Related Issues (20)
- afQuickField id field is overwritten - v7 HOT 9
- Array of objects set last object fields to null when remove unordered element HOT 6
- Cleanup issues, that are fixed by v7
- Problem with Meteor 1.11.1 Blazejs HOT 5
- Create a native 'autocomplete' type for `afQuickfield` in `AutoForm` that is Bootstrap themed. HOT 1
- Outdated links to SimpleSchema in README
- minCount and maxCount undefined inside afEachArrayItem HOT 5
- quickForm and autoForm not displaying - no error messages. HOT 8
- Make moment a weak dependency
- Run a meteor method in before hook and await callback? HOT 4
- Autoform hooks onSuccess not working HOT 13
- Demo link stale HOT 2
- Option list unwanted memory autosave form HOT 4
- Validation messages not showing - SimpleSchema 3.x HOT 4
- Why is there throttling on validateField HOT 2
- Remove global variables HOT 1
- Add coverage report to tests HOT 1
- Please add error/warning messages if no theme is installed HOT 4
- Cross - Posting: Incompatibility with Blaze-Async-PR HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-autoform.