Editor show false

Editor show false

vincmeistervincmeister Posts: 136Questions: 36Answers: 4

Hi Allan,

Need help on editor show false
According to this reference, i want to do a silent create. Submit new data without showing form.
My code:

$('#stand').on( 'click', function () {
        barcode = $('#barcode').val();
        editor
            .create({
                show:  false
            })
            .submit();
    } );

The form still appear, but closed after submit() has been executed.
Please advise

This question has an accepted answers - jump to answer

Answers

  • rf1234rf1234 Posts: 2,806Questions: 85Answers: 406
    Answer ✓

    this works:

    editor
        .create( false ) 
        .set( { 'proposal.govdept_id': ck.govdept.id,
                'proposal.instrument': ck.rfp.instrument,
                'proposal.type': ck.rfp.type,
                'proposal.derivative': ck.rfp.derivative } )
        .submit();
    

    you probably need to replace

    .create({
                    show:  false
                })
    

    with

    .create( false ) 
    

    and of course you need to set the editor's fields.

  • vincmeistervincmeister Posts: 136Questions: 36Answers: 4

    Thanks @rf1234
    it works

    .create( false )
    
This discussion has been closed.