Tell us what you are trying to do?
Since there is no autocomplete functionality for fields, I am developing it. The result I would like to obtain is the field to auto-complete with data (static for now). I succeeded but I have a problem: the field on which I am auto-filling is within a repeatable group, I should get its id to be able to proceed with the auto-filling, obviously every time the field is duplicated it recreates a new one id and so on.
At the moment I found this solution:
I identify the id by clicking on the element and then inserted it with the autocomplete
jQuery(document).ready(function( $ ){
var arrayAutocomplete = ["A", "B", "C", "D"];
document.addEventListener('click', function(e) {
$('#'+ e.target.id ).autocomplete({
source: arrayAutocomplete
});
}, false);
});
I would like to find a way to select that specific repeatable group and apply the js on that specific field
Is there a similar example that we can see?
hidden link
What is the link to your site?
hidden link
I am attaching the repeatable group structure where I have highlighted the field on which I want to apply the autocomplete.
Thanks
Hi there,
Please kindly consider that this is way beyond our support scope as it is a feature that is not implemented by Toolset.
The way you approached this is correct and you can use it. Another approach can be to use the FOCUS event:
hidden link
As soon as the input box s focused then you can apply the autocomplete functionality there.
We are unable to give you a final code and we only can give you an idea on how to appraoch.
Thank you for your understanding.