Editor submit "all" only submits editable fields

Editor submit "all" only submits editable fields

amanaV36amanaV36 Posts: 20Questions: 9Answers: 0

Hi allan,

i am currently running into a problem with non editable fields on editor. I need to submit full row data on some pages, but have some columns which are non editable. On preSubmit i need to process the full row data, but only the columns which are editable are getting submitted. Any solution for this? It does not work with 'allIfChanged' and 'all'. Simply no way to read the values of the cells i need.

Answers

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    Hi,

    The data present in preSubmit is defined by:

    1. The fields in the Editor form
    2. The value of submit.

    Given that you have used submit: 'allIfChanged', it suggests to me that the fields which are not editable are not in the Editor form at all and thus won't be available in the submitted data.

    To resolve that you could use the hidden field type and include the non-editable fields as hidden values, so the user won't see them, but you will still have access to them.

    Regards,
    Allan

  • amanaV36amanaV36 Posts: 20Questions: 9Answers: 0
    edited May 2017

    Hi allan,

    what you say is not correct. I have all fields in the editor form. Therefore i was expecting them to be submitted. My readonly fields are realized with adjusting the selector for the click event:

    var selector = 'tbody td.editable';
    if (managerAuth) {
        selector = 'tbody td.editable, tbody td.editable-manager';  
    }
                            
    oTable.on( 'click', selector, function (e) {
        jQuery('body').unbind("keydown");
        oTable.off('click');
        editor.inline( this, {
        onBlur: 'submit',
            submit: 'allIfChanged'
        } );
    } );
    
  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    Could you give me a link to the page showing the issue so I can debug it in that case please? I'm going to need to be able to look at what is happening to understand why it isn't working in this case.

    Regards,
    Allan

This discussion has been closed.