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

Question

Question

Hide add button in a collection

asked on April 10, 2020

How do I hide Add button in collection when the collection has a range of values?

 

Thanks

Priya

0 0

Replies

replied on April 10, 2020

If you set the collection to have between 2 and 5 rows, once the 5th row is added, the "Add" button will disappear. Use field settings on the collection to define the maximum number of rows. 

0 0
replied on April 10, 2020

Thanks. The maximum number of rows is dynamic. Is it possible to set that value from workflow?

0 0
replied on April 10, 2020

If the number of rows is populated by a lookup, you can use the third option in the collection settings "Append sets to sets populated by lookup". From there, you can say the User can add 0 rows on top of what the lookup returned with, or you can set a range aside from the dynamic response. If your rows are dynamically populated another way, you'll have to use CSS/JS for this solution. 

0 0
replied on April 10, 2020

Ok. Do you have an example of how to do this using CSS please?

0 0
replied on April 13, 2021

I know this is late but in case is looking for this, you can hide the add button with CSS:

.yourClassName .cf-collection-append {
     display: none !important;
}

You can also hide the option to delete with: 

.yourClassName .cf-collection-delete {
     display: none !important;
}

 

If you want to hide both these options, you can group them together:

.yourClassName .cf-collection-delete, .cf-collection-append {
	display: none !important;
}

 

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

Sign in to reply to this post.