Support

Account

Forum Replies Created

  • Hi @hube2,
    That is very close to what I ended up using. The main difference is I didn’t have to target the row as it’s a group not a repeater. I also didn’t use the trigger for field that was changed, but I will add that.

    This is what I used:

    $(document).on('change', '[data-key="field_64d372692bcc4"] .acf-input select', function() {
    	var field = acf.getField('field_64d372692bcc4');
    	var racedayId = field.val();
    		
            var data  =  { 
                action: 'newbury_admin_get_raceday_details',
                racedayId: racedayId,
            }
    		
    	$.ajax({
              url:    acf.get('ajaxurl'), 
              data:    acf.prepareForAjax(data), 
              type:    'post',
              dataType:  'json',
              success: function( json ){
    			
    		var result = json;
    		if(result[0].date) {
    			var date = result[0].date, dateSplit = date.split('-');
    			$('[data-key="field_64d224149988e"] .acf-input input[type=hidden]').val(dateSplit[2]+dateSplit[1]+dateSplit[0]);
    			$('[data-key="field_64d224149988e"] .acf-input input[type=text]').val(dateSplit[0]+'/'+dateSplit[1]+'/'+dateSplit[2]);
    			$('[data-key="field_64d2245f9988f"] .acf-input input[type=text]').val(result[0].Racetype);
    			$('[data-key="field_64d2249899890"] .acf-input input[type=url]').val(result[0].url);
    			$('[data-key="field_64d224b499891"] .acf-input input[type=text]').val(result[0].name);
    		}		
              }
         });
    });
  • It looks like iThemes Security Pro is the culprit, but I can’t see why it’s happening, so will talk to them to see what is going on.

  • Hi John,

    I wasn’t aware that I was using a plugin requiring the password not to be reused, but I will double check.

    Steve

Viewing 3 posts - 1 through 3 (of 3 total)