Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Can't seem to edit fields before submission

$
0
0

I tried both

        .on('initSubmit', async function( e, a ) {
            map = await teamNameMap()
            team_id = editor.field('system_name').val()
            team_name = map[team_id]
            editor.field('subsystem').val(team_id)
            editor.field('system_name').val(team_name)
            editor.field('api_token').val(Math.random(1) * 100)
        })

and

        .on('preSubmit', async function( e, o, a ) {
            console.log(e)
            data = o.data[Object.keys(o.data)[0]]
            data.subsystem = data.system_name
            let map = (await teamNameMap())
            data.system_name = map[data.subsystem]
            data.api_token = "cheese"
            o.data = data
        })

and neither seem to be affecting the data that gets sent to the server, afaics from dev console


Viewing all articles
Browse latest Browse all 2364

Trending Articles