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

Question

Question

When adding subsequent rows to a collection, the drop down in the new row doesn't consistenly populate look up choices.

asked on June 5, 2017

Hello All,

 

I have a user who is experiencing some issues in Forms regarding collections. The below is a verbatim account of what is going on:

 

I have created a "Time Sheet" form for our summer school/summer programs employees (EMP-HR-Time Sheets).  In the form I have a collection that includes a drop-down ('.collectionAssignments') that populates from a lookup rule (#3, from the vTSAssignments VIEW).  The drop-down contains the individual employee's various summer assignments.

 

I have tested the form from various PC's with Chrome and IE, from an iPhone with safari, and from a tablet.  I have tested from the "preview" and from the live form.  In all cases, when I add subsequent rows to the collection, the Assignments drop-down in the new row is populated with the lookup choices only about 25% of the time.  About 75% of the time, the drop-down is empty (there are no choices).  When it’s empty, it’s empty every time.  When it’s populated it’s populated every time.

 

After several days of this, I decided to create a hidden drop-down ('.hiddenAssignments'), and use jquery to populate the subsequent collection drop-downs as they were created:

 

    $('#q119 .cf-collection-append').click(function() {

      $('.cf-collection-block ul').each(function () {

        $('.csstime input').attr('type', 'time');

        $('.totalhours input').attr('readonly', true);

 

-->     $('.hiddenAssignments option').clone().appendTo('.collectionAssignments');

 

         Alert(‘Im here’)

      });

     });

 

This is one of the variations I've tried, having tried about 15 others I found in stackoverflow, etc.  Nothing has worked so far.  I have used alert(‘Im here’) to trace through the function, so I know that I running each line.

 

Question 1 - why would the drop-down be blank on subsequent collections?

 

Question 2 - what do you recommend I do from here?

Has anyone see anything like this in regards to their issues?

 

Thanks!

2 0

Replies

replied on June 5, 2017

Hi Charles,

We need more information to check the issue:

  1. Which version of Forms is used?
  2. How is the lookup rule configured? Is there any match condition on the rule? How many rules are set on this field?
  3. Is there any custom script on the lookup rule target field? Can you try if the issue exists after removing all custom scripts?
  4. When the issue happens, is there any lookup result in the first row? If the rule is "fill without condition", there is no reason for the newly added rows to be different than the existing row.

It would be better if video on reproducing the issue could be provided. 

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

Sign in to reply to this post.