I follow the instructions on this question: http://answers.laserfiche.com/questions/110714/how-to-insert-a-picture-in-a-form-on-forms#repliesToMain,
It works at the begining, but when I insert more code to the JS, the picture does not appear anymore, what could be the problem,
my complete code is:
$(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'));
}
});
});
$(document).ready(function(){
$('#q80').hide();
$('.tab1').on('click',showPre);
$('.tab2').on('click',showExpe);
});
function showExpe(){
$('.tab1').removeClass('selected');
$('.tab2').addClass('selected');
$('.Pre').hide();
$('.Expe').show();
}
function showPre(){
$('.tab1').addClass('selected');
$('.tab2').removeClass('selected');
$('.Pre').show();
$('.Expe').hide();
}
$(document).ready(function () {
$('.Submit').hide(); //hide the submit button by default
$('.signSignatureBtn').click(function () {
$('.Submit').show(); //show the submit button after signing
});
$(document).on('click','.form-sig-remove',function(){
$('.Submit').hide(); //hide the submit button if the signature is removed
});
});