You are viewing limited content. For full access, please sign in.

Question

Question

Javascript invalidating data

asked on May 25, 2017 Show version history

I have the following bit of code on my form, which is working fine, except that it is causing LF Forms to throw a validation error on the field in the table that this effects, when I try to submit.

Anyone have any advice?

$(document).on("lookupcomplete",function(){
  setTimeout(function(){
    $('.link [type="text"]').each(function(e,el){
   var link=$(el).val();
    $(el).replaceWith($('<a href="http://www.my.path.com/myfiles/' + link + '.pdf" target="_blank">' + link + '</a>'));
  });}, 500);  
  });

Errors encountered during forms submission: 
Field Name: Application ID, Position: 5, Error: Invalid number of rows in collection/table. [LFF9313-InvalidNumberOfElementsInCollection] [LFF9312-ErrorOccuredDuringFormsValidation]
You can click the back button on the browser to correct and resubmit the form. [LFF9320-FormsValidationAggregateException]

0 0

Replies

replied on May 26, 2017

Your custom script removed certain fields so backend validation failed.

If you want to use backend validation in your case, do not replace fields with links, but rather hide the fields and insert links after the fields.

1 0
replied on June 5, 2019

Hi Rui,

I have the same problem Forms (Forms Professional Version 10.4.0.1256), could you give me an example of the solution you mention ?, Thanks !!!

Regards,

Marco.

You are not allowed to follow up in this post.

Sign in to reply to this post.