Merge pull request #6034 from codingCoffee/render_image
webform: render image in web form using setTimeout
This commit is contained in:
commit
ef67b9265b
1 changed files with 8 additions and 0 deletions
|
|
@ -75,6 +75,14 @@ export default class WebForm {
|
|||
if(doc) {
|
||||
this.field_group.set_values(doc);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.field_group.fields_list.forEach((field_instance) => {
|
||||
if (field_instance.df.fieldtype === "Attach" && field_instance.get_value().match(".(?:jpg|gif|jpeg|png)") ){
|
||||
field_instance.$input_wrapper.append(`<img src=${field_instance.get_value()} width="auto" height=200>`);
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
|
||||
get_values() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue