Home Forums Add-ons Repeater Field Lack of real world support for the js api Reply To: Lack of real world support for the js api

  • Thanks again John. What really annoys me is the developers have created this fantastic plugin, then gone further and added a javascript library which adds another level of sophistication, but then seem to ignore customers that want to make use of it.

    I’ve worked for 40+ yeas in IT development. support and consulting, and I understand it’s difficult, but we never released a toolset then didn’t give our customers documentation or support for it.

    Anyway, enough a a rant. I have a field group as follows;
    Picture – image
    Location – text
    Date – datepicker
    People – Repeater
    –Person – relationship
    –coord_left – number
    –coordtop – number
    –coordright – number
    –coordbottom – number

    I load the image and run a js using Clarifai’s face recognition engine. It returns boxes around each face in the picture and a list of coords of these boxes.

    I want to populate the repeater field with the ID of a unknown person (from the people field group) and he coords from above. The user will then change the person from the unknown person to one from the field group and save the post.

    I have the recognition working and the trigger click firing the code from the acf.addaction append code you pointed me at. I’m trying now to add the ID and coord fields with the data from the face recognition.

    I was hoping I could have something to loop through the faces I have, triggering the new row, then adding the 5 fields. Although this should work, it’s a bit messy.
    I would have hoped there was a add.row function that I could call to add my rows before displaying them, rather than acting like keyboard input and relying on the users to save the updates.

    I find it very difficult to identify the field names as on the page they seem to be part of a hierarchy which I cannot find a description for (e.g. id=”acf-field_609af70f9fdac-acfcloneindex-field_609af86f9fdb1″ name=”acf[field_609af70f9fdac][acfcloneindex][field_609af86f9fdb1] where the field ending in db1 corresponds to one of the coordinate fields I defined). This makes the coding more difficult.

    I hope I’ve not gone on too much, but thanks for your help anyway.