Pass value through bubble editing via POST

Pass value through bubble editing via POST

kumamarikumamari Posts: 24Questions: 9Answers: 1
edited August 2017 in Free community support

I'm trying to pass a row number via POST through the editor.bubble function. All I get is what I have in the network tab that is attached. I need to reference the row number via $_POST['data']["row_number"] to access when I hit my SSP script.

Right now my code looks like this.

$('#scratchTable').on( 'click', 'tbody td:not(:first-child)', function (e) { editor.bubble( this ); } );

Any help is appreciated.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin
    Answer ✓

    You could use preSubmit to modify the data that is being sent to the server.

    editor.one( 'preSubmit', function ( e, data, action ) {
      data.row_number = ...;
    } );
    

    Allan

  • kumamarikumamari Posts: 24Questions: 9Answers: 1

    Thank you! Works perfectly :smile:

This discussion has been closed.