diff --git a/js/build.templates.js b/js/build.templates.js
index ae6d60c0..d029bed4 100644
--- a/js/build.templates.js
+++ b/js/build.templates.js
@@ -7,15 +7,15 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.buttons"] = Handleb
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.checkbox"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n {{ description }}
\n \n \n \n \n
\n \n\n Field is required.
\n\n";
+ return "\n {{ description }}
\n\n \n \n \n {{ option.label || option.id }}
\n \n \n \n \n\n \n \n \n \n \n
\n \n \n\n Field is required.
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.date"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "
{{ description }}
\n\n\nField is required.
\n";
+ return "{{ description }}
\n\n\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.email"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nThe input is not a valid email address.
\nField is required.
\n";
+ return "{{ description }}
\n\n {{ value }}
\n \n\n\nThe input is not a valid email address.
\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.field"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -39,7 +39,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.image"] = Handlebar
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.input"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nField is required.
\n";
+ return "{{ description }}
\n\n {{ value }}
\n \n\n\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.interface"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -51,7 +51,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.interface"] = Handl
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.number"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nThis field only accept up to 15 digits.
\nField is required.
\nOnly positive digits are allowed.
\nOnly integer digits are allowed.
\nOnly digits or {{decimals}} digits after point are allowed.
\n";
+ return "{{ description }}
\n\n\n {{ value }}
\n \n\n\n\nThis field only accept up to 15 digits.
\nField is required.
\nOnly positive digits are allowed.
\nOnly integer digits are allowed.
\nOnly digits or {{decimals}} digits after point are allowed.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.paragraph"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -63,11 +63,11 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.password"] = Handle
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.radio"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n {{ description }}
\n \n \n \n \n
\n \n Field is required.
\n\n";
+ return "\n {{ description }}
\n \n \n \n {{ option.label || option.id }}
\n \n \n \n \n \n \n \n \n \n
\n \n \n Field is required.
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.select"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nField is required.
\n";
+ return "{{ description }}
\n\n {{ value }}
\n \n\n\n\nField is required.
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.signature"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -75,19 +75,19 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.signature"] = Handl
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.starRating"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\n \n \n \n \n
\nField is required.
\n";
+ return "{{ description }}
\n\n \n = option.id\">\n \n \n \n \n
\n\n \n \n \n \n
\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.telephone"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nField is required.
\nPhone could contain ; , . ( ) - + SPACE * # and numbers.
\n";
+ return "{{ description }}
\n\n\n\nField is required.
\nPhone could contain ; , . ( ) - + SPACE * # and numbers.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.textarea"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nField is required.
\n";
+ return "{{ description }}
\n\n \n \n\n\n\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.time"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nField is required.
\n";
+ return "{{ description }}
\n\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.title"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -95,7 +95,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.title"] = Handlebar
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.url"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "{{ description }}
\n\nThe input is not a valid URL.
\nField is required.
\n";
+ return "{{ description }}
\n\n {{ value }}
\n \n\n\n\nThe input is not a valid URL.
\nField is required.
\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.components.wysiwyg"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -103,5 +103,5 @@ this["Fliplet"]["Widget"]["Templates"]["templates.components.wysiwyg"] = Handleb
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.radio"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
\ No newline at end of file
diff --git a/js/components/textarea.js b/js/components/textarea.js
index 93142e1d..ef54d4aa 100644
--- a/js/components/textarea.js
+++ b/js/components/textarea.js
@@ -22,5 +22,10 @@ Fliplet.FormBuilder.field('textarea', {
rules.value.required = window.validators.required;
}
return rules;
+ },
+ methods: {
+ replaceNewLines: function(value) {
+ return value.replace(/(?:\r\n|\r|\n)/g, '
')
+ }
}
});
diff --git a/js/interface.templates.js b/js/interface.templates.js
index a278abef..a68b2a19 100644
--- a/js/interface.templates.js
+++ b/js/interface.templates.js
@@ -7,15 +7,15 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.buttons"] = Han
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.checkbox"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.date"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n\n \n \n
\n\n";
+ return "\n \n \n
\n\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.email"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.file"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -48,11 +48,11 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.image"] = Handl
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.input"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.number"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.paragraph"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -64,7 +64,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.password"] = Ha
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.select"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.signature"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -72,19 +72,19 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.signature"] = H
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.starRating"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.telephone"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.textarea"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.time"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.title"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -92,7 +92,7 @@ this["Fliplet"]["Widget"]["Templates"]["templates.configurations.title"] = Handl
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.url"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
- return "\n \n \n
\n\n \n \n
\n\n \n \n
\n";
+ return "\n \n \n
\n\n \n \n
\n\n \n \n
\n\n";
},"useData":true});
this["Fliplet"]["Widget"]["Templates"]["templates.configurations.wysiwyg"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
diff --git a/js/libs/core.js b/js/libs/core.js
index 5674b7cf..d2b85127 100644
--- a/js/libs/core.js
+++ b/js/libs/core.js
@@ -161,6 +161,10 @@ Fliplet.FormBuilder = (function() {
canHide: {
type: Boolean,
default: true
+ },
+ readonly: {
+ type: Boolean,
+ default: false
}
}, component.props);
diff --git a/templates/components/checkbox.build.hbs b/templates/components/checkbox.build.hbs
index 87297d95..235dfd8d 100644
--- a/templates/components/checkbox.build.hbs
+++ b/templates/components/checkbox.build.hbs
@@ -1,18 +1,34 @@
\{{ description }}
-
-
-
+
+
+ \{{ option.label || option.id }}
+
-
-
+
+
+
+
+
+
+
+
+
+
+
Field is required.
diff --git a/templates/components/date.build.hbs b/templates/components/date.build.hbs
index dc5b4901..555aba2d 100644
--- a/templates/components/date.build.hbs
+++ b/templates/components/date.build.hbs
@@ -1,33 +1,64 @@
\{{ description }}
Field is required.
diff --git a/templates/components/email.build.hbs b/templates/components/email.build.hbs
index 86dcf775..2e2bd92d 100644
--- a/templates/components/email.build.hbs
+++ b/templates/components/email.build.hbs
@@ -1,5 +1,19 @@
\{{ description }}
-
+ \{{ value }}
+
+
+\{{ description }}
-
+ \{{ value }}
+
+
+\{{ description }}
-
+ \{{ value }}
+
+
+
+
\{{ description }}
-
-
-
-
-
+
+
+
+ \{{ option.label || option.id }}
+
+
+
+
+
+
+
+
+
+
+
Field is required.
diff --git a/templates/components/select.build.hbs b/templates/components/select.build.hbs
index f3d289d4..a8701991 100644
--- a/templates/components/select.build.hbs
+++ b/templates/components/select.build.hbs
@@ -1,4 +1,20 @@
\{{ description }}
+
+ \{{ value }}
+
+
+
Field is required.
+
diff --git a/templates/components/starRating.build.hbs b/templates/components/starRating.build.hbs
index 70bd0cc7..5f0211c9 100644
--- a/templates/components/starRating.build.hbs
+++ b/templates/components/starRating.build.hbs
@@ -1,5 +1,23 @@
\{{ description }}
-
+
+
+
+
+
+
+
+
+
\{{ description }}
-
+
\{{ value }}
+
+
+
+\{{ description }}
-