Hi, I just recently using auto fill the add page using lookup.
I can see the data that I require from the lookup appeared but only the date field not appeared.
i try from date format to date format, text format (dd/mm/yyyy) to date format also not appeared.is there any special step I need to do first?this is the target field
DATE_RESIGNED_MEMBERS date DEFAULT NULL
Dates from the database are in ‘yyyy-mm-dd’ format, if you use date/time picker, the format is not valid because input data should be in the format of your locale. You can however use the “autofill” event to format the data, e.g. in Startup Script
$("#x_MySourceField").on("autofill", function(e, args) {
var $target = $(args.target);
if ($target.data("field") == "x_MyTargetField") { // Check field name
// Change the args.data
}
});
Note that the setting in View Tag is “yMMdd”, the actual date separator is from your locale setting. You can set the “Format Pattern”, but is that really what you want? If you change the date format just for auto-fill, the List/View page will show the date in your format pattern, different from your locale setting.
already put at Client Scripts/table-Specific/AddCopy Pagebut still not fillup.my db=koperasi
target field=date_resigned_members
lookup field=date_resigned_members
target table= resign_tracking
lookup table =balance_tracking_tabwhat where should I changed?
// Write your table-specific startup script here, no need to add script tags.
$("#x_MySourceField").on("autofill", function(e, balance_tracking_tab) {
var $target = $(balance_tracking_tab.date_resigned_members1);
if ($target.date_resigned_members1("date_resigned_members1") == "x_MyTargetField") { // Check field name
// Change the args.data
}
});
You also need to replace "x_MySourceField" and "x_MyTargetField" by the real ids of your fields. If you are not sure, inspect HTML Element. Make sure you understand before you modify. Compare your code with the example carefully.
$("#date_resigned_members1").on("autofill", function(e, args) {
var $target = $(args.target);
if ($target.data("field") == "date_resigned_members1") { // Check field name
// Change the args.data
}
});
still no luckthere is no “args.data” to be changed. I can’t see. Only “args.target” i dont know how to use elements inspect.can someone help me?