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

Question

Question

Automatic Autofill Button Within a Collection - LF 10.2.0.834

asked on October 31, 2018 Show version history

Morning,

Looking for some pre-existing JS that I can use to have my autofill button auto trigger within a collection. One of the conditions exists outside of the collection.

I'm currently using the following, but am having no success.

$('.cf-collection-append').click(function(){
  $('.lookupcondition').change(autofill);
});

 

Attached is a snapshot of my form

 

Thanks in advance

Form Issue.PNG
Form Issue.PNG (23.23 KB)
0 0

Replies

replied on October 31, 2018

Have you tried:

$('.cf-collection-append input').click(function(){
  $('.lookupcondition').change(autofill);
});

^ I just added the 'input' element to the .cf-collection-append.

0 0
replied on October 31, 2018

Unfortunately does not automatically trigger

0 0
replied on October 31, 2018 Show version history

You could try setting a delay. Maybe the lookup data needs to load before it can auto fill.

  setTimeout(function(){

//whatever code you need to run

  }, 1000);//wait one second to run your code. Adjust as needed.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.