Dynamic checkboxes in editor

Dynamic checkboxes in editor

szakendreszakendre Posts: 24Questions: 10Answers: 0

Hi,

First of all: Merry Christmas to Everybody!

I have a problem with dynamically generated checkboxes.
When I use
editor.on( 'initEdit', function ()
OR
editor.on( 'open', function ()

to add options:
editor.field('solvers').update(labelValuePairs);

The options are added to editor but in edit mode the database values aren't checked at first time.
I mean if I close the editor windows and open it again the corresponding values are checked, but if I reload the page they are unchecked at first open.

How can I solve this?

Thank you and best regards:
Endre, Szak

Answers

  • rf1234rf1234 Posts: 2,801Questions: 85Answers: 406

    Have you tried this?
    editor.field('solvers').update(labelValuePairs, false);

  • szakendreszakendre Posts: 24Questions: 10Answers: 0

    Thank you for your help and time.
    I tried this right now, the problem remains.
    Best regards:
    Endre, Szak

  • rf1234rf1234 Posts: 2,801Questions: 85Answers: 406

    Then you should post a test case please! Or more code (formatted using Markdown, see below.)

  • allanallan Posts: 61,433Questions: 1Answers: 10,049 Site admin

    Agreed - there is something we are missing here.

    but if I reload the page they are unchecked at first open.

    It sounds like the updates aren't being saved to the database. I think we'd need a link to a test case showing this issue, to be able to help resolve it please.

    Thanks,
    Allan

Sign In or Register to comment.