Attempting to hide 'Add New Item' in List View Control


Badge +4

I've added a list view control (for the first time!) to side of my form. I'm showing all values of the list view. However, I just want it to be informational. It's not a big issue, but I would like to hide the 'Add new item' link--especially when in new or edit mode of the actual form in which this list view appears. I was able to <F12> it in IE11 to determine its class, td.ms-addnew. In F12 mode I was able to add display: none and successfully hid it. But, I attempted to apply this to the CSS Class field in the list view control settings panel with no luck.

 

CSSIssueforListViewControl.png

 

 

I've used:

 

.td.ms-addnew {

    display: none !important;  

}

With no luck. As a noob to the CSS class field, I'm not sure I am using the correct format. Any suggestions?


15 replies

Userlevel 7
Badge +11

Hi Drew,

 

remove the dot (period) before the td.  td is a node name not a class name.

 

td.ms-addnew

{

  display:none;

}

 

cheers,

Vadim

Badge +4

I pasted above in exactly as you typed. 'Add new item' still appeared as in my initial screen capture after I confirmed a successful publication of the revision (I viewed it both in IE11 and Chrome). I talked it over with a team lead who, having never worked in Nintex forms, suggested perhaps that the CSS class field in the control settings panel isn't exactly meant to achieve what I am attempting. ??

Badge +4

FYI, I also attempted visibility: hidden; in the same format. This also did not work.

Userlevel 7
Badge +11

Hi Drew,

that's really odd.  I don't know why it wouldn't work.  Hopefully one of the other community members can shed some light on this.

I've attached my example form.  You'll need to configure the ListView control to point to a valid list.

cheers,

Vadim

Badge +4

Thanks. I'll continue to investigate. If nothing, else thank for your initial response and quick follow-up. I am fairly new to this community but find it vital and responsive thanks to people like you!happy.png

Userlevel 7
Badge +17

I also added the CSS

td.ms-addnew

{

  display:none;

}

To the form settings, custom CSS section and the "Add New" link was removed from the form's list view control.

Are you adding the CSS to the Form Settings?

Badge +4

Hi, just to be sure I'm doing it right, confirm that this is the correct field to be entering this per my screen capture (also, fyi, I am version 2.3.4.0 if that means anything):

ConfirmCSSClassField.png

Thanks!

Badge +3

Hi Drew,

You need to open the form settings dialog and enter it into the Custom CSS options there

FormSettings.PNG

CustomCSS.PNG

Userlevel 7
Badge +17

Yes, Suzanne shows exactly how Vadim and I applied the css.

If this works for you, then I suggest to mark Vadim's answer as correct and Suzanne's as helpful. Let us know the outcome.

Userlevel 5
Badge +12

I've used this in the past with success!

Badge +11

Funny, just yesterday I had a request to add an additional one of these at the top of the list view page!!!!

Userlevel 7
Badge +11

Fun happy.png

Userlevel 7
Badge +17

Sounds like a good option if you copy the default view and then have those changes applied to the new view. It may not be an option to change that on the AllItems view if that was chosen originally.

Badge +3

Hello,

I've come to cross this page to look for a solution to hide Attachment "Add Attachment" and "Delete" controls in EDIT mode only.

On Form Setting Custom CSS, I entered 'display:none;' and this removed "Add Attachment" and "Delete" from both NEW and EDIT mode. But I need to hide it only on EDIT mode.

Any suggestions how I can specify the view mode to hide the controls?

Thank you,

-Naoko

Userlevel 7
Badge +17

This post will be the wrong place for that question ‌, it would be best to post your own question so we can help you further to your scenario. But if you are hiding controls on a form in edit mode, I suggest to do that using a rule and not CSS. That way you can tell easily if you are in Edit mode via the rule formulas.

Reply