I need to append a profile picture to a form in forms, so a candidate from a employment agency can upload a picture of himself and at the moment to see the aplication in the repository the picture most appear on the form.
how can I achieve that
I need to append a profile picture to a form in forms, so a candidate from a employment agency can upload a picture of himself and at the moment to see the aplication in the repository the picture most appear on the form.
how can I achieve that
Hi Dan
This is the Original Answers Post that we had worked from and it works well
https://answers.laserfiche.com/questions/90599/Viewing-a-Form-attachment-in-LF-client
What we found when using this is that the Uploaded Image when Printed on the Form will appear directly under wherever the Upload Button is located on the Form and is bound by the size of the Upload buttons class size. We found if we made the photo to large it would cut off part of the image as it was extending outside the allowable space or if the Upload Button is too close to the Right Edge of the Form, the photo gets cut off when embedded in the form.
As our requirement was to have larger photos appear on the page like in a report, we made a slight variation to the JavaScript included in the original post (our revised JS is shown below) which has the Photo appear on the form in the area below the Upload Button but always starting at the left column. Like the code in the post, you can change the px width to adjust the photo size on the form.
Revised JS for Photo to appear below Upload Button at left margin of page
$(document).ready(function () {
var iml = ['jpg','jpeg','gif','png'];
$('.files tbody tr').each(function() {
if ($(this).find('a').length && $.inArray($(this).find('a').attr('title').match(/\.(\w{3,4})$/)[1],iml)>-1) {
var ims = $(this).find('a').attr('href'),
imr = $('<img style="width:300px;" />');
imr.attr('src',ims);
$('<tr><td colspan=3>'+imr.prop('outerHTML')+'</td></tr>').insertAfter($(this).find('a').closest('tr'));
}
});
});
FYI, although the Photos are embedded in the Form, they are still uploaded as separate files to the Repository with the form.
Yes, we have implemented a solution where the uploaded pictures on the form are displayed in the Submitted Form in the repository. It takes a combination of JS and a revised printform.js file. If Xiuhong's post doesn't provide the answer you need, drop a note and I can provide a document with instructions.
Yes, I will appreciate the documentation.
thanks
Hi Dan
This is the Original Answers Post that we had worked from and it works well
https://answers.laserfiche.com/questions/90599/Viewing-a-Form-attachment-in-LF-client
What we found when using this is that the Uploaded Image when Printed on the Form will appear directly under wherever the Upload Button is located on the Form and is bound by the size of the Upload buttons class size. We found if we made the photo to large it would cut off part of the image as it was extending outside the allowable space or if the Upload Button is too close to the Right Edge of the Form, the photo gets cut off when embedded in the form.
As our requirement was to have larger photos appear on the page like in a report, we made a slight variation to the JavaScript included in the original post (our revised JS is shown below) which has the Photo appear on the form in the area below the Upload Button but always starting at the left column. Like the code in the post, you can change the px width to adjust the photo size on the form.
Revised JS for Photo to appear below Upload Button at left margin of page
$(document).ready(function () {
var iml = ['jpg','jpeg','gif','png'];
$('.files tbody tr').each(function() {
if ($(this).find('a').length && $.inArray($(this).find('a').attr('title').match(/\.(\w{3,4})$/)[1],iml)>-1) {
var ims = $(this).find('a').attr('href'),
imr = $('<img style="width:300px;" />');
imr.attr('src',ims);
$('<tr><td colspan=3>'+imr.prop('outerHTML')+'</td></tr>').insertAfter($(this).find('a').closest('tr'));
}
});
});
FYI, although the Photos are embedded in the Form, they are still uploaded as separate files to the Repository with the form.
everything works thanks, I now need to relocate de image to the superior right corner of the form and if is posible hide the details of the upload, like file size and name.
I accept suggestions.
thanks again.
It will likely take some CSS and/or JS to move the Image to where you need and to hide what you don't want to see. I'm not sure how that will affect the photos as we were not required to do that in our implementations of the solution and would need to take a deeper look.
Hi all
We've noticed since applying the Forms 10.2 Update 2 patch that this has stopped working. Still working through it to understand where the issue is.
The coming soon Forms 10.3 added the out-of-box solution for display uploaded images on the form and it works when preview/fill the form/save to repository, you can try this feature with Forms 10.3 beta and get feedback to us: https://answers.laserfiche.com/questions/130585/Forms-103--Beta-Feedback
Has anyone found a solution to this since Forms 10.2 release
Yes, this feature was rolled out in 10.4.3+