I have taken a field of type field collection in my user-profile-form and its cardinality is set to unlimited as I wanted to have "add more" button for the users. I want to restrict the addition of fieldset to five numbers.
If I change the number of fields to be displayed to 5 from edit, it renders all the five fieldsets altogether which I do not want.
I tried overriding field_multiple_value_form() in my template.php file but did not succeeded. Please suggest some ideas to achieve this. Thanks In advance.