Support

Account

Home Forums ACF PRO Validation error with clone field

Solving

Validation error with clone field

  • I have a flexible content field with many layouts called ‘content’. I want to clone this field for a side column, so i’ve created a new clone field where I have selected ‘content’ as the field to be cloned.

    When I want to add content in the cloned field on a page, it says “validation failed. 1 field requires attention”. It doesn’t matter what type of field i want to add in the cloned field, I can’t save the page because of this error. Normally, the page scrolls to the field where the problem is, but it doesnt do that in this case, and all fields seem to be filled in fine.

    I use version 5.4.8

  • You’re going to need to narrow it down a bit. There can be some validation errors depending on the setup. If you export the associated field groups to a JSON file, put that in a .zip file and upload it, someone might be able to help you figure it out.

  • Good idea.. its a lot of code.

    The part that’s cloned is the ‘Inhoud’ field with the flexible content.

  • I was thinking more of a .zip file with an exported .json file in it so that I can import it into a test site

  • Ofcourse.. didn’t see the attachment button, sorry.

    There’s a radio button that says “Zijkolom”, if you switch it to “Aan”, a clone of the first flexible content field ‘Inhoud’ is shown at the bottom as “Zijkolom 2”

  • So, related to this, I have just discovered while working on my current project that cloned flexible content fields to not work, I’m not seeing validations errors, but none of the entered values get saved. This may be related to what you are seeing.

    Also, radio fields inside of flexible content fields that have been cloned, that’s even more complicated. The duplicated radio fields end up acting line one big radio button field instead of individual fields and this can cause validation issues. This is a known issue. I was able to work around this issue by setting the display of the cloned fields to “Group”.

    It seems that the clone field still has a few technical problems that need to be worked out. You should report these bugs by opening a new support ticket https://support.advancedcustomfields.com/new-ticket/

  • Thanks. Seems that for now it’s not a good way to go for what I want. I can generate the JSON and then edit the ID’s of all fields, then import it again to get an exact copy.

    Will report the bugs i’ve found so far.

  • I should have said, cloned radio fields inside of a of a flex field. I have a flex field where I wanted to add a radio field multiple times. Even with field name prefixing all of the clones were working as a single field, I had it set to “required” and some of the fields were hidden by conditional logic. The hidden radio fields were still causing validation issues. The developer knows about this one.

    For all I know there are other types of fields this happens with as well, it’s hard to test every possibility.

    The best thing to do if you have time is to figure out and narrow down exactly what’s causing the bug/issue.

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

The topic ‘Validation error with clone field’ is closed to new replies.