Support

Account

Home Forums Add-ons Repeater Field Deleted row in repeater keeps showing Reply To: Deleted row in repeater keeps showing

  • Hi John.
    Yes it is in a IF statement like you pointed out.
    But I think I’ve solved it already.
    I did a check if the image and/or video field was not empty, and if so, render it.
    But I also needed to check if the switch with the radiobuttons is present/set.
    So instead of:

    
    $image = get_sub_field('afbeelding');
    $video = get_sub_field('video');
    if ($image) {
    ... do something
    }
    if ($video) {
    ... do something
    }
    

    I now have this one:

    
    $image = get_sub_field('afbeelding');
    $video = get_sub_field('video');
    // This is the radio switch
    $image_or_video = get_sub_field('image_or_video');
    if ($image && $image_or_video == 'Afbeelding') {
    ... do something
    }
    if ($video && $image_or_video == 'Video') {
    ... do something
    }
    

    This solved the front-end rendering issue.
    But apparantly, even if you delete the row with the video, the data is still present.
    And that is strange, because it doesn’t happen when I delete a row with an image.