Support

Account

Home Forums Backend Issues (wp-admin) How to disable sub fields by one of the subfield

Solving

How to disable sub fields by one of the subfield

  • Hello community
    My field structure is like this:

    Repeatable field
    —true/false
    —text field
    — image field

    I want to disable full row of the repeatable field which got true/false = true or checked
    https://imgur.com/a/TfBeMIw

    Like in this example row 1 should be disable but not row 2 and 3.
    I can disable with CSS and making input field disable but problem for me is how to right code (logic) for backend (very limited knowledge of coding)

    I try acf/load_field, acf/prepare_field but logically I am blind so wont able to make it yet.

    I hope I make myself clear.

    Thank you

  • Need more specifics.

    Are you trying to hide the rows in the admin?

    Are you trying to hide these rows in an acf form on the front end?

    Are you trying to not output the content of these rows?

    Please provide more information about exactly what you are trying to do. What are you expecting to happen? What actually happens?

  • Thanks for reply, sorry not able to explain good last time. I will try to explain myself more clearly.

    I want, whenever user click on Checkbox (true/false) that row will locked for further editing.
    so user cannot edit that row.

    It is like accountant lock each transaction for further editing.

    Now for locking I will change background color of row to grey and disable fields. but this also means I have to disable “checkbox” also.
    Image will explain little more about it. https://ibb.co/HrnXKbj

    With load_field I am able to get field object but
    1: How to one repeatable > child make changes to other repeatable child
    2: Add class to row when I checked true/false checkbox so I change color.

    I hope this time I am more clear to you.

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

You must be logged in to reply to this topic.