Attachment control not resizing the filename within form area

  • 8 November 2018
  • 2 replies
  • 1 view

Badge +3

I have a problem with attachment control resizing property. Some filenames in my forms get too lengthy and attachment controls are placed inside a panel. for the filenames with long names, the delete option does not appear. But when i place the same control outside of the panel, it works just fine. Below is an example of attachment with same file both in and out of the panel in edit mode.

220623_pastedImage_1.png


2 replies

Badge +7

I would first suggest trying to build your form to accommodate for extremely long filenames rather than expect it to expand the form.

I don't have a good answer on how to make the panel auto-expand like the form does.

As a band-aide fix, you could try this code, which which will swap the Delete and Filename columns when you click the table so that the Delete column is first and therefore always visible. (I don't suggest this as a longtime fix though.)

NWF$(".nf-attachmentsTable").click(function(){
     NWF$("table tr").each(function() {
          NWF$(this).children(".ms-propertysheet").after(NWF$(this).children(".ms-vb"));
     });
});

It does require you to click the table to swap the columns though. 

Badge +3

Thanks for the tip there Chad, the column swap definitely is a great temporary solution. It works for now.

Reply