Merge pull request #6042 from codingCoffee/webformclass

web_form_class: using value instead of get_value
This commit is contained in:
Ameya Shenoy 2018-08-31 11:00:56 +00:00 committed by GitHub
commit 9e19641fa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,8 @@ export default class WebForm {
setTimeout(() => {
this.field_group.fields_list.forEach((field_instance) => {
if (field_instance.df.fieldtype === "Attach" && field_instance.get_value().match(".(?:jpg|gif|jpeg|png)") ){
let instance_value = field_instance.value;
if (instance_value != null && field_instance.df.fieldtype === "Attach" && instance_value.match(".(?:jpg|gif|jpeg|png)") ){
field_instance.$input_wrapper.append(`<img src=${field_instance.get_value()} width="auto" height=200>`);
}
});