• Resolved askjoo

    (@askjoo)


    Hello, I am using ACF Pro 5, and the latest version of Validated Field for ACF.

    I Choose Repeater for the parent field, then create sub-fields with a type of Validated Field and a sub-sub-field type of type text.

    When I update the value, it does not save. (all fields save except for the repeater).

    The validated field works on it’s own, and the repeater works on it’s own. Just not together. Any help would be appreciated.

    https://wordpress.org/plugins/validated-field-for-acf/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author doublesharp

    (@doublesharp)

    It sounds like this could be a bug (handling the nested field types can get tricky) but I will have to do some testing to be sure. Once I’ve had some time to do some research I will let know my findings and push and update if necessary.

    Thanks!

    Plugin Author doublesharp

    (@doublesharp)

    Can you let me know what type of validation you are using? Regex/PHP/Unique/etc…

    Plugin Author doublesharp

    (@doublesharp)

    My apologies, I’ve been really busy and haven’t gotten a chance to look into this yet, but have not forgotten.

    Thread Starter askjoo

    (@askjoo)

    hi doublesharp. sorry for the late response.

    i haven’t used any validation function, instead i was trying to use ‘unique for post type’ and ‘unique for post type -> key’

    when i switched back to ACF 4 with the repeater plugin addon, it started saving again but fails to validate (just saves), so I think this is a problem with the ACF 5 PRO.

    We’re having the same issue. Any ETA on a fix?

    Love the plugin!! Thanks for creating it!!

    Plugin Author doublesharp

    (@doublesharp)

    I had a couple of things taking up most of my time lately but am looking into this now, hopefully a resolution coming shortly.

    J

    Plugin Author doublesharp

    (@doublesharp)

    Hi! Would you mind trying out the beta version here and see if it works for you for repeater and non-repeater fields? I had to make quite a few updates to get it all working properly, there are unfortunately some bugs due to the ACF5 updates.

    validated-field-for-acf.zip

    Plugin Author doublesharp

    (@doublesharp)

    Were either of you able to test the file I posted above? I’m going to have limited Internet connectivity soon and was hoping to push it out. I may go ahead and do it shortly as it definitely fixes some problems and doesn’t seem to cause new ones. There may still be some bugs that need to be fixed (the front end form handling seems suspect).

    J

    Plugin Author doublesharp

    (@doublesharp)

    My testing shows this to be fixed in the zip provided above so I am marking it as resolved. It will be included in the next release of the plugin shortly.

    Plugin Author doublesharp

    (@doublesharp)

    PS – If you like the plugin I would appreciate a positive review, thanks 🙂

    Thread Starter askjoo

    (@askjoo)

    Hi Double Sharp,

    First off I want to thank you so much for your help. I haven’t had a chance to get to my computer but I recently did some testing and the save now works! You are great.

    I just have one question. What is the different between

    Unique Value as Post Type

    vs

    Unique Value as Post Type -> Key

    I am trying to make sure there are no duplicate values for the specific repeater field for that post of the custom post type only. Not the range of all my custom post type.

    For example, when I used Unique Value as Post Type -> Key

    I add post Shirt for Custom Post Type, Clothing,

    if I have materials

    Shirt
    – Cotton
    – Thread
    – Ink

    I expect there to be a flag when I add Cotton again

    Shirt
    – Cotton
    – Thread
    – Ink
    x Cotton (you already added cotton in Shirts Post)

    Which works. However, when I add a new post for that Clothing Type

    Jeans
    – Cotton
    – Thread
    – Ink

    It gives me

    Jeans
    x Cotton (you already added cotton in Shirts Post)
    – Thread
    – Ink

    I do not want this. I just want it to be unique for the repeater in that post.

    I also tried Unique Value as Post Type but I still can’t get those results.

    Can you help me? It might be another issue. If so, I can open a different ticket. Thanks!!

    Plugin Author doublesharp

    (@doublesharp)

    @askjoo The idea is that for “Post Type” it doesn’t matter what meta_key you use, it will make sure it is a unique value for any field under that post type. For “Post Type + Key” it only validates that particular meta_key for the given post type, but across all posts. In your example you are looking for “This Post” and “This Post + Key” options, which unfortunately don’t exist right now.

    The good/bad news is that I just had to fix a bug related to the input masking, so I need to push out a new version anyway. The SQL queries should be pretty straightforward so I’ll see if I can add it in.

    Thread Starter askjoo

    (@askjoo)

    That would be amazing!! This way we could make sure there are simple mistakes made for duplicate values in that specific repeater field! Thanks again. I already rated you 5/5.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Repeater with Validation Field does not save’ is closed to new replies.