Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
It is kinda strange but db_persist writes no data if it takes value from repeatable field. Sorry, i don't have access to the source code at the moment but it is easy to reproduce with this pseudo-code example:
Code: Select all
<show repeabale>
    <if field contains exact value> //compare if checkbox is checked at this iteration
        <db_persist> // write to external field not in the repeatable
    </if field contains exact value>
</show repeabale> 


Strange thing that "if" condition is working and cms:show needed value works too and also i can db_persist some value(eg random_name) BUT it makes no output if I try to persist the value :/

PS it would be super great if I could write with db_persist to the field withing repeatable but it seems to be not possible. But the problem mentioned in the post drives me crazy because I see no reason why it fails :/
It's been just mentioned a day ago. You are right, writing into repeatables is supported only by <cms:db_persist_form /> but not the <cms:db_persist />.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
As @trendoman pointed out - we cannot write into repeatable-regions.
However, it is not clear from your code whether the field you are writing into is a repeatable-region or a regular one.

If it is a regular region, perhaps the save process in encountering any error and hence the data is not persisting.
<cms:db_persist> reports any errors it encounters in the save process (k_error block as I am sure you know). Please check if that is not getting triggered for any errors.
3 posts Page 1 of 1
cron