Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
@KK,

Currently I have a checkbox editable and wish to have some flexibility with naming my values. If I use bare numeric minimum for values (1, 2, 3, .. ) then less than 100 such numeric values would already hit the limit, taken into account that values must be enclosed with 1 symbol from both sides to be correctly used later in custom_field filtering (100, 101, ... ,999).

TLDR
I will add to this question some description of the usecase to prevent any ranting about 'this is not for everybody'. :lol: Actually, everybody can have some kind of form (as I am now), which may have 100-200 YES/NO answers. Making such a form with separate checkbox editable for each question row has proved itself inconvenient, given the amount of background calculations Couch does upon each page load. So even 300 editables in a template is overkill for it (slows down dramatically). SO, my optimisation now includes making it ONE editable with multiple options and take care of the rest (packing multiple regular 'unbound' inputs together into one list of values) with my code in k_success.

Thanks.
Don't see any problem with that.
Go ahead and make the change. Share your findings with us.
I have successfully managed to get 400 values. It was somewhat bulky road, as I had to check with database why some values just were not appearing. It occurred that there were some spaces and newlines among opt_selected values as well as opt_values data.

My newly revised cms:trim http://www.couchcms.com/forum/viewtopic.php?f=8&t=10372 helped immensely to get this sorted out and since that it was all working just amazingly fast.
With 250 editables instead of almost 600, page went from absolutely unresponsive to 1 sec load. Nice job.



Look in backend, auto-arranged with max 5 checkboxes per row

ScreenCut-12-13---20-25-16-.png
ScreenCut-12-13---20-25-16-.png (14.7 KiB) Viewed 2338 times
Care to also post a screenshot of how the resulting form looks like?
OK, I am posting a sample screen. It's just a checklist with about 200 rows (see scrollbar).
Not the biggest one. There currently are about 100 checklists like that, with the largest one having about 350 rows.

P.S. For anyone interested, to display a checkbox like that, without label, make opt_values=' =1'

Attachments

5 posts Page 1 of 1
cron