Support

Account

Home Forums Add-ons Repeater Field Repeater rows don't save new files Reply To: Repeater rows don't save new files

  • I actually was using the field key at first. I switched to “documents” in an effort to debug. I put it back to the field key for the below test. Anyway, printing the $value array gives me back an array with all the rows of the repeater, as expected.

    Array
    (
        [0] => Array
            (
                [file] =>
                [file_description] => 
                [file_user] =>
                [file_date] =>
                [file_phase] =>
            )
    )

    Sorry, truncated the values for space. The values were all exactly as expected for the existing file. A URL for the file itself, text for description, User object for user, @ format for date, and WP Object for phase. Totally good.

    Doing the same thing after the $value[], however, shows the above row correctly, and then the row I am trying to add like this:

    
        [2] => Array
            (
                [file] => 414
                [file_description] => 
                [file_user] => 1
                [file_date] => 1374226973000
                [file_phase] => 232
            )

    So instead of objects and URLs, it’s showing the ID of the item I am about to insert, I guess. Is this appropriate? Just making sure.

    I’m kind of at a loss. It’s still deleting the previous file ID. Everything else remains when I add a row – description, user, date, phase. The only thing deleted from previous rows is the file.