Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hello everyone!

Have a following question. Currently, I have a repeatable region that contains lots of fields so it is quite tricky to add/edit it. Also, not all regions inside it are needed all the time so there are several checks when I show it on the website that help to show only needed information.

Because of that, mosaic would suit much better here. The main problem is that it is quite an old website and about a thousand pages already contain a lot of data in that repeatable region which would be a shame to loose.

Is there any way to somehow convert existing repeatable to mosaic without loosing the data? Maybe write an automation script that would read repeatable and put the data to newly created mosaic?

As far as I know, db_persist does not support mosaic so it seems to be not possible. But if there is any other way around I would be very grateful for any help here :)

Thank you
Hi,

I don't think it'd be possible (not without a lot of effort at least) to convert a repeatable-region into mosaic.

My advice would be to continue with the repeatable-region but make a few changes to it that would make the user experience closer to that of a mosaic -

1. Use 'stacked_layout' to show the fields going from up to down (instead of the default left to right which cramps up the display when number of fields is large). Please see '3. Revised repeatable-regions' at viewtopic.php?f=5&t=11105 for details.

2. Use 'conditional fields' to show only the fields that are relevant for a particular choice - please see viewtopic.php?f=5&t=11512 for details.

This way you won't lose any data and also have a better user experience.

Hope this helps.
2 posts Page 1 of 1