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

Question

Question

copied form not showing drop down menu

asked on July 21, 2024

I copied a working form. Renamed and published it and I did not make any changes to form fields. I verified all the rules, lookup rules were exactly the same. CSS and Jscript are exactly the same. After user submit the form, it goes to CEO for approval and they are not seeing approve, reject drop down menu. We are using Laserfiche Forms Professional Version 10.4.5.324.

Tried to delete the forms field rules and recreated the field rules but that did not help. Any help is appreciated.

 

Screenshot 2024-07-21 171448.png
Screenshot 2024-07-21 171603.png
0 0

Replies

replied on July 22, 2024

Hi Nanda,

How are the options filled into the dropdown list? Are they dynamically loaded from javascript, or lookup rule, or some fixed options defined in the field? If they are dynamically loaded, you'd better check again if the script or lookup rule is working or not still. I'd recommend open a support case for this if you think the copied form is all good.

0 0
replied on July 22, 2024

 

Thank you for your reply. The copied form is exactly the same as the original. I think the options are filled up dynamically using javascript. Below is the code.

//Count rows in Correction Table
$(document).ready(function() {
  rowcount2();
  $('.myTable2').on('click', '.form-del-field', function () {
    rowcount2();
  });
    $('.myTable2').on('click', function () {
    rowcount2();
  });
  $('.myTable2').on('click', '.cf-table-add-row', function () {
    rowcount2();
  });
  function rowcount2() {
    $('.myrows2 input').val($('.myTable2 tr').length-1);
  }
});

//Add New Row to Approval Table for additional approvals
$( document ).ready(function() {
 // alert('works');
    var status = $('#q2 input').val();
    //var table2 = $('.myrows2 input').val()*1;
   //alert(status);
    if (status=='Pending Approval'){
    $('.mytable .cf-table-add-row').trigger('click')
    }
  });

  //Add correction row to match approval row
  $( document ).ready(function() {
    var table1 = $('.myrows input').val()*1;
    var table2 = $('.myrows2 input').val()*1;
        var status2 = $('#q2 input').val();
   // alert(table1);
    if ((table1!=table2) && (status2=='Pending Corrections')){
    $('.myTable2 .cf-table-add-row').trigger('click')
    }
  });


//Show Applicable Action Button
$(document).ready( function() {
        $(".action-btn.Submit").hide();//Return for corrections
         // alert($('.step').text());
        var formsstep = $('.formsstep input').val()
     if ((formsstep == "Initial Submission")||(formsstep == "Pending Corrections")){
        $(".action-btn.Approve").hide();
        $(".action-btn.Submit").show();
        $(".action-btn.Reject").hide();
        }else{
        $(".action-btn.Approve").hide();
        $(".action-btn.Submit").hide();
        $(".action-btn.Reject").hide();

        }
$('.decision select').change( function() {
        if ($(this).val() == "Approved"){
        $(".action-btn.Approve").show();
        $(".action-btn.Submit").hide();
        $(".action-btn.Reject").hide();
        }
        else if ($(this).val() == "Rejected"){
        $(".action-btn.Approve").hide();
        $(".action-btn.Submit").hide();
        $(".action-btn.Reject").show();
        }
       else if ($(this).val() == "Return for Corrections"){
        $(".action-btn.Approve").hide();
        $(".action-btn.Submit").show();
        $(".action-btn.Reject").hide();
        }else{
        $(".action-btn.Approve").hide();
        $(".action-btn.Submit").hide();
        $(".action-btn.Reject").hide();

        }


});

});
$( document ).ready(function() {
$('.theNumber input').change(function(){
  var numberCols = $('.theNumber input').val();
  for (var i = 0; i < numberCols; i++){
  $('#q50 .cf-collection-append').trigger('click');
  }
});
});
 

0 0
replied on July 22, 2024

Much of your javascript is using class names (theNumber, myTable2, myrows2, etc.) - but there are three lines of code that reference the field IDs (two for #q2 and one for #q50).  Maybe double check that the field ID numbers are the same on the copied process as they were on the original.

 

P.S. You can use the "{...} code" here on LFAnswers to make your code easier to read.

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

Sign in to reply to this post.