Support

Account

Home Forums Backend Issues (wp-admin) Many fields in a repeater : long saving times Reply To: Many fields in a repeater : long saving times

  • Hi John,

    Thank you for your quick reply.
    You mention Gutenberg in your 4th reply of the thread on January 29, 2018.
    But it doesn’t matter, I don’t use Gutenberg either, I just mentioned this in case there had been some changes to WordPress since then that makes my problem now irrelevant. Obviously not the case.

    With that number of fields I would defiantly look at a different way to build it.
    I fear this is what I’ll end up doing. Using a repeater is very justified considering what I’m building, but I’ll probably have to separate some functions in different posts types. Not ideal at all, but better than the alternative.

    Before resorting to that solution, I’d like to ask if the solution I thought of could potentially work :

    – Create an additional field in the row (lets call it rowmodified)

    – When there is any change in any field of the row, have a value (for example “1”) added dynamically in the field rowmodified.

    – Add a function that does the following when the post is updated:
    * Start by checking/saving the value of rowmodified in the first row of the repeater.
    * if rowmodified has a value of 1, insert/update the other fields of the row. THEN delete the value of rowmodified.
    * if rowmodified has no value, don’t check/update the other fields of the row (i suppose this is the tricky / impossible part)
    * On to the next row
    * Update the remaining fields out of the repeater.

    As I said I’m not really a developer so i have no idea if it is technically possible, I suppose not, but who knows.