How to Add field in confirm button?

How to Add field in confirm button?

misteammisteam Posts: 37Questions: 12Answers: 0

I have already added the code something like this

className: 'qa_reassign'
},{
extend: "selected",
text: "Reassign",
action: function ( e, dt, node, config ) {
if(confirm( "Are you sure you want to reassign this transaction?" )){
editor
.edit( table.row( { selected: true } ).index(), false )
.set( 'qa_status', 'Disapproved' )
.set( 'type_ap', '' )
.set( 'qa_approvedby', agent_name )
.submit();
}

},

This question has an accepted answers - jump to answer

Answers

  • misteammisteam Posts: 37Questions: 12Answers: 0

    Hi sir @allan, can you please help me? Thanks in Advance :)

  • colincolin Posts: 10,137Questions: 0Answers: 1,698
    Answer ✓

    Hi @misteam ,

    You can do something like this here. This is changing the office in an edit form, but you can do something similar for your select.

    Cheers,

    Colin

  • misteammisteam Posts: 37Questions: 12Answers: 0

    Hi @colin, Thanks for this. Did the office field will update in the database when I click ok? Thanks

  • misteammisteam Posts: 37Questions: 12Answers: 0

    Hi @colin, I already get how it is working. I have 50 plus fields so I need to hide it all. :)

  • colincolin Posts: 10,137Questions: 0Answers: 1,698

    Yeah, that's the unfortunate part, but yep, it should do the trick.

Sign In or Register to comment.