We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I have simple scheme with subarray. Tell me please, how can I set random id to each element of them? result: http://prntscr.com/adg79g
var randId={ type:String, default:getRand }; var testShema=mongoose.Schema({ field:randId, object:{field1:randId,field2:randId}, array:[randId] })
I try to use formageField like this https://github.com/node4good/formage/wiki/Custom-Fields , but randId of each element are equal. case result: http://prntscr.com/adgfcd UPD: Resolved by schema setter, but question with defaul value within arrow still opened
var ReadOnlyWidget = formage.widgets.TextWidget.extend({ render: function (res) { this.attrs.readonly='readonly'; this._super(res); } }); var ReadOnly = formage.fields.StringField.extend({ init: function (options) { options = options || {}; options.widget = ReadOnlyWidget; this._super(options); } }); var randId={ type:String, formageField:ReadOnly, set: function(v){return v||getRand(); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I have simple scheme with subarray. Tell me please, how can I set random id to each element of them? result: http://prntscr.com/adg79g
I try to use formageField like this https://github.com/node4good/formage/wiki/Custom-Fields , but randId of each element are equal. case result: http://prntscr.com/adgfcd
UPD:
Resolved by schema setter, but question with defaul value within arrow still opened
The text was updated successfully, but these errors were encountered: