how to get hidden field value, i have to pass in ajax data option
how to get hidden field value, i have to pass in ajax data option
![naveensargam](https://secure.gravatar.com/avatar/cfaf9c84966ef03d2251dc6a1543a390/?default=https%3A%2F%2Fvanillicon.com%2Fcfaf9c84966ef03d2251dc6a1543a390_200.png&rating=g&size=120)
ajax: {
url:"{{ url('activity:qset_qsetblng') }}",
data:function(d){
var selected = parentTable.row( { selected: true } )
if ( selected.any() ) {
d.parent_id = selected.data().id;
d.csrfmiddlewaretoken = '{{ csrf_token }}'
d.question = true
d.alerton = JSON.stringify($("#DTE_Field_alerton").val())
d.question_id = $("#DTE_Field_question").val()
d.min = $("#DTE_Field_min").val()
d.max = $("#DTE_Field_max").val()
d.alertbelow = $("#DTE_Field_alertbelow").val()
d.alertabove = $("#DTE_Field_alertabove").val()
d.answertype = $("#DTE_Field_answertype").val()
d.seqno = $("#DTE_Field_seqno").val()
d.ismandatory = $("#DTE_Field_ismandatory").val()
d.options = $("#DTE_Field_options").val()
d.id = $("#DTE_Field_pk").val() //giving undefined here
d.ctzoffset = $("#id_ctzoffset").val()
}
}
},
Replies
This is from an Editor form? I'd suggest using the Editor API for this -
field().val()
. E.g.:Allan