Jump to content

Possible to delete empty repeater items after saving with hook


Juergen
 Share

Recommended Posts

Hello @ all,

today I am struggeling with the deletion of empty repeater items after saving in the backend.

Explaination:

Imagine you are adding an additional repeater item in your form in a page via the "Add button". Then you forget to fill out this item so it is empty.

After submitting the form the empty repeater item is still there because you did not deleted it with the basket symbol (deletion)

Goal:

In theory it must be possible to create a hook that checks the repeater items for content and delete the empty items after saving.

At the moment I dont know how to check if an item is empty or not. I know how to delete fields in the repeater item but not the complete item itself.

Can anyone point me into the right direction?

Best regards

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...