How to populate data to textarea after I select the dropdown field, like a dependent field... please
How to populate data to textarea after I select the dropdown field, like a dependent field... please
stancaballero
Posts: 29Questions: 9Answers: 0
in Editor
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
If you help me solve this problem i will renew my account if needed
This example from this thread is doing that for a text field, using
dependent()
andfield().set()
, it would be the same for a textarea field. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.Cheers,
Colin
This one after I selected Criteria [ACCED] field I want the details to populate in acced textarea next to it
Yep, understood - did you try what I suggested? What happened?
Colin
editorAEF.dependent( ['tbl_cashmanagement_aef.criteria_acced'], function( val, data, callback, e ) {
$.ajax( {
url: '../datatables/controllers/cont_acced_list.php',
data: {
input1: editorAEF.field('tbl_cashmanagement_aef.criteria_acced').val()
},
success: function ( result ) {
editorAEF.field('acced_details').set(result);
//The problem here how to display the value only not the whole json data?
}
} );
callback(true);
} );
I got it now, Thank you. Another question colin may i know the additional features like we can now format the number in editor field, etc... coz i really love if you add that features
What formatting would you like to apply to it? you can use a number input in the browser using:
However hat won't format using decimal / thousands separators. For that you'd need to use a masked input such as with this plug-in.
Allan
I mean after user input 1000 in editor field it automatically add comma like 1,000.00, I tried masked but I fail to control the input of the user.
And also the type: select in editor field allow the user to type so that he can search to the specific word/data in the selection. tnx