New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apostrophe-forms

Package Overview
Dependencies
Maintainers
11
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apostrophe-forms - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

lib/exporter.js

37

index.js

@@ -15,3 +15,2 @@ /* jshint node:true */

forms.Forms = function(options, callback) {
var self = this;

@@ -85,11 +84,14 @@

if (item.ids && item.ids[0]) {
criteria._id = item.ids[0]
criteria._id = item.ids[0];
}
};
self.sanitize = function(item) {
// only one form per widget, always selected by id
item.by = 'id';
if (item.ids && item.ids[0]) {
item.ids = [ self.apos.sanitizeId(item.ids[0]) ];
}
self.extendWidget = function(widget) {
widget.sanitize = function(item) {
// only one form per widget, always selected by id
item.by = 'id';
if (item.ids && item.ids[0]) {
item.ids = [ self._apos.sanitizeId(item.ids[0]) ];
}
};
};

@@ -184,3 +186,3 @@

},
{
{
name: 'required',

@@ -293,2 +295,5 @@ label: 'Must Check to Complete Form',

}
object.fieldId = self._apos.sanitizeId(item.fieldId) || self._apos.generateId();
return widget.afterConvertFields(req, object, function(e) {

@@ -361,3 +366,6 @@ return callback(e, object);

var value = req.body[field.label];
result[field.label] = self.sanitizeField(field, value);
result[field.fieldId] = {
label: field.label,
value: self.sanitizeField(field, value)
};
});

@@ -449,2 +457,11 @@ result.submittedAt = new Date();

//csv exporter: /apos-forms/export
// require('./lib/exporter.js')(self);
// self.exportPost = function(options){
// self._apos.db.collection('aposFormSubmissions', function(err, collection) {
// });
// };
// busted-ass A2 0.5 bootstrap process fails if I

@@ -451,0 +468,0 @@ // don't do this right here, so I'm doing my

{
"name": "apostrophe-forms",
"version": "0.5.2",
"version": "0.5.3",
"description": "Allow your users to build forms on the fly on their Apostrophe sites",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -47,1 +47,7 @@ A form builder for the [Apostrophe CMS](http://apostrophenow.org).

Subclass the module and override the `afterSubmit` method which is provided for this purpose.
## Changelog
0.5.3: fields now have a `fieldId` which will improve CSV export (however, not saving yet). The next minor version will be a bc break in the way content is saved in the collection.
The forms widget now shows only the selected form, not all of them!
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc