skyrun
Active Member
on this repeating group form:
View attachment 17277
i have element javascript on 'who' that fires onChange. it looks up the hourly rate for the person selected (using index.php?option=com_fabrik&format=raw&task=plugin.userAjax&method=hourlyRateLookup&id=xxx which functions to return {"rate":40} for example.
my question is how do i write the javascript to fill in the id of the person selected for that row....
if this were on a normal form (not in a repeat group) , i would use:
var id = $('srms_work_order_labor___who_raw').value;
to get the value and set somethinglike $('srms_work_order_labor___cost').value = jsonResponse.rate;
but that doesn't work when i'm in a repeat group.
where would i find the id of the user that was changed (and the row number to be able to set the corresponding cost column).
View attachment 17277
i have element javascript on 'who' that fires onChange. it looks up the hourly rate for the person selected (using index.php?option=com_fabrik&format=raw&task=plugin.userAjax&method=hourlyRateLookup&id=xxx which functions to return {"rate":40} for example.
my question is how do i write the javascript to fill in the id of the person selected for that row....
if this were on a normal form (not in a repeat group) , i would use:
var id = $('srms_work_order_labor___who_raw').value;
to get the value and set somethinglike $('srms_work_order_labor___cost').value = jsonResponse.rate;
but that doesn't work when i'm in a repeat group.
where would i find the id of the user that was changed (and the row number to be able to set the corresponding cost column).