Closed Mike-Heneghan closed 5 years ago
At the moment after selecting 3 categories the checkboxes are't ticked although the seleted categories continue to populate.
There is also not any pop-up style explanation of why further categories can't be added.
Additionally any categories added after the first 3 will be added to the "selected categories" and won't be cleared resulting in situations as below:
Successfully amended the js code so that when the limit of categories is reached the "You have selected the following categories:" field doesn't continue to be populated.
Now need to have a message or info for the user that further categories cannot be added.
Tried mocking up a solution to the issue of a user trying to add a fourth category. Could create a tooltip style pop-up on the selected field and explain there is a max of 3
Using the data-tooltip dyamically doesn't seem to be possible.
Need to change the way I go about it.
The custom tooltips on the checkboxes had issues as they could not be dynamically hidden or shown based on the number of categories selected. This was due to the fact they were compiled in the static files and the attributes were not accessible in the dom?
Wasted a bit of time trying to get them to work although as a simpler alternative dynamically added an <h3>
with info for the user about trying to add a third category as per: https://drive.google.com/file/d/1_Gdg6iyppBXxh_sYesAvMoD1KsjVTWKz/view?usp=sharing
The intention was to have the code that appends the <h3>
hide and show the tool tips on the checkboxes but rather than use anymore time for the feature I thought it might be best to go with the current improvement.
Merged into master