Dependency Only for form, not inline editing

Dependency Only for form, not inline editing

bfarkasbfarkas Posts: 181Questions: 48Answers: 0

When I setup fields to hide based on dependencies, it works great, except if I want people to also be able to edit using keytable inline. Then any field that was hidden is no longer editable. I tried using undependent on form close, but I think it is just retriggered when you edit inline. Is there any good way to distinguish between the two modes for dependencies?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    You're in the right place with the form close, but undependent() wouldn't work here as the fields would still be hidden - undependent() just disables that dependency.

    Instead, you need to call either show() or field().show() in that form close to get those fields being displayed again,

    Colin

  • bfarkasbfarkas Posts: 181Questions: 48Answers: 0

    AH! It felt like it should have worked, makes sense. For those looking just did a simple:

    editor.on( 'close', function () {
        editor.show();
        });
    

    Obviously make sure to update editor to your editor instance.

    Thanks Colin!

This discussion has been closed.