Support

Account

Home Forums Backend Issues (wp-admin) Populate Text Fields on Select Field Change Reply To: Populate Text Fields on Select Field Change

  • the only real difference between the JS for the repeater and the JS for the non-repeater fields is that on the repeater field I added

    
    var $row = e.$el.closest('.acf-row');
    

    and then each place where I need to get or set a value for a field $row.find() is used instead of $()

    Other than this the JS code from one to the other is pretty much identical and I’ve already built in the ability to use the “title” field on the repeater because I have a good feeling that the client will want this added once the see the draft of the site I’m building for them.

    Hope it helps, there’s a bunch of extra code in there due to dealing with both a repeater and an non-repeater, but the code was just completed and tested today.